home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
COMMADIO
/
RBBS2.LZH
/
RBBS-PC.BAS
< prev
Wrap
BASIC Source File
|
1986-03-15
|
191KB
|
5,501 lines
3 ' $linesize: 132
4 ' $title: 'RBBS CPC14-1A, Copyright 1986 by D. Thomas Mack'
5 ' WARNING !!! DO NOT CHANGE, BYPASS OR REMOVE LINES 3-31
9 'by D. Thomas Mack & Jon J. Martin
10 ' The Second Ring Aircomm
11 ' 10210 Oxfordshire Road 4396 N. Prairie Willow Ct.
12 ' Great Falls, Virginia 22066 Concord, California 94521
13 '
14 ' *******************************NOTICE*************************************
15 ' * A limited license is granted to all users of this program and it's *
16 ' * companion program, CONFIG (version 1.95), to make copies of this *
17 ' * program and distribute the copies to other users, on the following *
18 ' * conditions: *
19 ' * 1. The notices contained in lines 3 through 59 of the program *
20 ' * are not altered, bypassed, or removed. *
21 ' * 2. The program is not to be distributed to others in modified *
22 ' * form (i.e. the line numbers must remain the same). *
23 ' * 3. No fee is to be charged (or any other consideration received) *
24 ' * for copying or distributing these programs without an express *
25 ' * written agreement with D. Thomas Mack, The Second Ring, 10210 *
26 ' * Oxfordshire Road, Great falls, Virginia 22006 *
27 ' * *
28 ' * Copyright (c) 1983, 1984, 1985, 1986 D. Thomas Mack, The Second Ring *
29 ' **************************************************************************
'
' $INCLUDE: 'RBBS-VAR.BAS'
'
' $SUBTITLE: 'Main-line RBBS-PC Program'
CALL COPYWRIT
100 CLEAR:' Erase all variables
ON ERROR GOTO 13000:' Set ERROR trap
DEF SEG:' Point to BASIC
CLS:' Clear Screen
WIDTH 80:' Set Screen Width
SCREEN 0,0,0:' Text, No color, Pg 0
KEY OFF:' Line 25 turned off
DEFINT A-Z:' All var. integer
' ********************* Variable Definitions ********************************
ACKNOWLEDGE$ = CHR$(6)
ACTIVE.MESSAGE$=CHR$(225)
BACKSPACE$ = CHR$(8) + CHR$(32) + CHR$(8)
BACK.ARROW$ = CHR$(29) + CHR$(32) + CHR$(29)
CANCEL$ = CHR$(24)
COLOR.RESET$=CHR$(27)+"[00;37;40m"
CONFIG.FILENAME$ = "RBBS-PC.DEF"
CARRIAGE.RETURN$ = CHR$(13)
DELETED.MESSAGE$=CHR$(226)
END.TRANSMISSION$ = CHR$(4)
ESCAPE$ = CHR$(27)
FALSE = 0:' Set FALSE condition
F1.KEY = 59
F10.KEY = 68
LINE.FEED$ = CHR$(10)
LINE.FEEDS = NOT FALSE
LOCK.STATUS$ = "UM UU UB UD"
NEGATIVE.ACKNOWLEDGE$ = CHR$(21)
OMNINET = 2:'
RIGHT.MARGIN = 72
RETURN.LINE.FEED$ = CARRIAGE.RETURN$ + LINE.FEED$
START.OF.HEADER$ = CHR$(1)
TIME.LOGGED.ON$ = SPACE$(8)
TRANSFER.OPTIONS$=" type <A)scii, <M>NP, <X>modem, <C>Xmodem/CRC, <N>one"
TRUE = NOT FALSE:' Set TRUE condition
USER.DATA = FALSE
VERSION.ID$ = "CPC14.1A"
XOFF$ = CHR$(19)
XON$ = CHR$(17)
' ******************** Logon Error Message Table ****************************
LG$(1) = "Registration Check Failed"
LG$(2) = "Sysop name attempted"
LG$(3) = "Locked out attempt"
LG$(4) = "Password Attempt Failed"
LG$(5) = "Auto Lockout done"
LG$(6) = "Name in use on another Node! "
LG$(7) = "300 Baud access not allowed!"
CALL GETCOMND
CALL READDEF
'
' *****************************************************************************
' * INITIALIZE OMNINET INTERFACE IF OMNINET IN USE *
' *****************************************************************************
'
128 IF NETWORK.TYPE = OMNINET THEN _
CN$ = SPACE$(535) : _
CALL INITIO(A)
'
' *****************************************************************************
' * ESTABLISH NEXT CALLERS FILE RECORD AVAILABLE *
' *****************************************************************************
'
GOSUB 56000
CALLERS.FILE.INDEX = LOF(4) / 64
130 GET 4,CALLERS.FILE.INDEX
IF LEFT$(CALLERS.RECORD$,13) = STRING$(13,0) THEN _
CALLERS.FILE.INDEX = CALLERS.FILE.INDEX-1 : _
GOTO 130
'
' *****************************************************************************
' * TEST FOR MESSAGE FILE PRESENT (ABORT IF NOT PRESENT) *
' *****************************************************************************
'
135 ACTIVE.MESSAGE.FILE$ = MAIN.MESSAGE.FILE$
ACTIVE.USER.FILE$ = MAIN.USER.FILE$
GOSUB 4910
GET 1,NODE.RECORD.INDEX
'
' *****************************************************************************
' * GET CURRENT STATUS OF SYSOP AVAIL, SYSOP ANNOY, SYSOP NEXT, & PRINTER *
' *****************************************************************************
'
SYSOP.AVAILABLE = VAL(MID$(MESSAGE.RECORD$,32,2))
SYSOP.ANNOY = VAL(MID$(MESSAGE.RECORD$,34,2))
SYSOP.NEXT = VAL(MID$(MESSAGE.RECORD$,36,2))
PRINTER = VAL(MID$(MESSAGE.RECORD$,38,2))
EXIT.TO.DOORS = VAL(MID$(MESSAGE.RECORD$,40,2))
SNOOP = VAL(MID$(MESSAGE.RECORD$,58,2))
MID$(MESSAGE.RECORD$,57,1)="I"
PUT 1,NODE.RECORD.INDEX
GOSUB 12985
'
' *****************************************************************************
' * TEST FOR COLOR GRAPHICS MONITOR AND ANSI.SYS SUPPORT TO ALLOW THE LOCAL *
' * SYSOP TO SEE THE SAME COLOR MENUS AND SCREENS THAT THE REMOTE USER SEES *
' *****************************************************************************
'
DEF SEG = 0
IF (PEEK(&H410) AND &H30) <> &H30 AND _
USE.COLOR THEN _
COLOR.SUPPORT = TRUE : _
A$ = COLOR.RESET$ : _
LOCAL.USER = TRUE : _
GOSUB 12979 : _
LOCAL.USER = FALSE
'
' *****************************************************************************
' * TEST FOR MULTI LINK PRESENT IF NOT COMPAQ COMPUTER *
' *****************************************************************************
'
IF COMPUTER.TYPE <> 1 THEN _
MULTI.LINK.PRESENT = PEEK(&H1FE) + 256*PEEK(&H1FF) : _
IF MULTI.LINK.PRESENT > 0 THEN _
DEF SEG = MULTI.LINK.PRESENT : _
MULTI.LINK.COM.PORT = (&H64 + PEEK(&H58) + 256*PEEK(&H59) + &HC) : _
IF PEEK(MULTI.LINK.COM.PORT) = &H1 OR &H2 THEN _
POKE (MULTI.LINK.COM.PORT),&H9
'
' *****************************************************************************
' * RESET MULTI LINK SPECIAL PARAMETERS TO NORMAL (NOT EXIT TO DOORS) *
' *****************************************************************************
'
DEF SEG
IF MULTI.LINK.PRESENT THEN _
AX = &HB00 : _ ' Turn off ML's carrier monitoring.
BX = 0 : _
GOSUB 60510 : _
AX = &H701 : _ ' Change terminal type to ML type 1.
BX = 0 : _
GOSUB 60510 : _
AX = &H1 : _ ' Conditionally enque on comm. port
GOSUB 60505
IF NOT MNP.SUPPORT THEN _
TRANSFER.OPTIONS$ = MID$(TRANSFER.OPTIONS$,1,14) + _
MID$(TRANSFER.OPTIONS$,22)
'
' *****************************************************************************
' * DISPLAY RBBS-PC MAIN FUNCTION KEY DISPLAY *
' *****************************************************************************
'
170 CLS
PRINT "RBBS-PC VERSION ";VERSION.ID$;" Node ";NODE.ID$
PRINT "Free memory: "; FRE("A")
PRINT"Press:"
FOR FUNCTION.KEY.INDEX = 1 TO 12
PRINT SYSOP.FUNCTION.KEY$(FUNCTION.KEY.INDEX)
IF FUNCTION.KEY.INDEX < 11 THEN _
KEY FUNCTION.KEY.INDEX,""
NEXT
'
' *****************************************************************************
' * IF RUNNING MORE THAN ONE NODE IN A DOS 3.X ENVIRONMENT (OR HIGHER) UNDER *
' * MULTILINK, THEN SET THE "SHARE.IT" INDICATOR ON SO THAT ALL FILES CAN BE *
' * ACCESSED BY ALL PARTITIONS IN A MULTI-TASKING ENVIRONMENT (I.E. MULTI- *
' * LINK). *
' *****************************************************************************
'
' IF DOS.VERSION > 2 AND _
' MAXIMUM.NUMBER.OF.NODES > 1 AND _
' MULTI.LINK.PRESENT THEN _
' SHARE.IT = TRUE
'
' *****************************************************************************
' * DISPLAY CURRENT STATUS OF SYSOP AVAIL, SYSOP ANNOY, SYSOP NEXT, & PRINTER*
' *****************************************************************************
'
175 GOSUB 30500
SUBROUTINE.PARAMETER = 2
CALL LINE25
'
' *****************************************************************************
' * WAIT FOR THE PHONE TO RING AND ANSWER IT *
' *****************************************************************************
SUBROUTINE.PARAMETER = 1
200 CALL ANSWERIT
IF EC > 1 THEN _
GOTO 13000
ON SUBROUTINE.PARAMETER GOTO 410,330,826,10595,13540,202
202 GOSUB 60010
SUBROUTINE.PARAMETER = 3
GOTO 200
'
' *****************************************************************************
' * DETERMINE BAUD RATE *
' *****************************************************************************
'
330 GOSUB 21280
IF BAUD.TEST = 0 OR BAUD.TEST = 300 THEN _
BAUD.RATE.DIVISOR = &H180 : _
BPS = -1 : _
GOTO 331
IF BAUD.TEST = 1200 OR BAUD.TEST = 2400 THEN _
BPS = -2-(BAUD.TEST / 1200) : _
BAUD.RATE.DIVISOR = 48 * (BPS + 5) : _
GOTO 331
IF BAUD.TEST = 4800 OR BAUD.TEST = 9600 THEN _
BPS = -4-(BAUD.TEST /4800) : _
BAUD.RATE.DIVISOR = 12 * (BPS + 7) : _
GOTO 331
SUBROUTINE.PARAMETER = 2 : _
GOTO 200
331 CALL SETBAUD
'
' *****************************************************************************
' * DISPLAY WELCOME LINE *
' *****************************************************************************
'
345 SUBROUTINE.PARAMETER = 1
CALL AMORPM
CALL FINDTIME (USER.LOGON.TIME!)
TIME.LOGGED.ON$ = TIME$
A$ = "WELCOME TO " + RBBS.NAME$ + CARRIAGE.RETURN$
GOSUB 12976
TEST.PARITY = TRUE
FILE.NAME$ = LEFT$(WELCOME.FILE$,2) + "PRELOG"
346 CALL FINDIT
IF NOT OK THEN _
GOTO 400
347 BYPASS.TIME.CHECK = TRUE
GOSUB 43030
GOSUB 6000
BYPASS.TIME.CHECK = FALSE
FF = FALSE
'
' *****************************************************************************
' * GET USER NAME *
' * C - COMMAND FROM NEWUSER REGISTER OPTIONS (CHANGE NAME OR ADDRESS) *
' *****************************************************************************
'
400 UPPER.CASE = FALSE
A1$ = "What is your "
GOSUB 12500
CALL COMMINFO
IF FF THEN _
LOGON.ERROR.INDEX = 1 : _
GOTO 10620
IF RESTRICT.BAUD = -1 AND BPS = -1 THEN _
LOGON.ERROR.INDEX = 7 : _
GOTO 10620
'
' *****************************************************************************
' * CHECK IF SAME USER ON ANOTHER NODE *
' *****************************************************************************
'
410 FOR NODE.INDEX = 2 TO NODES.IN.SYSTEM + 1
GET 1,NODE.INDEX
IF INSTR(MESSAGE.RECORD$,ACTIVE.USER.NAME$) THEN _
IF MID$(MESSAGE.RECORD$,57,1) = "A" THEN _
LOGON.ERROR.INDEX = 6 : _
LG$(6) = LG$(6) + LEFT$(MESSAGE.RECORD$,25) : _
GOTO 10620 _
ELSE A$ = "Welcome back, " + _
LEFT$(MESSAGE.RECORD$,INSTR(MESSAGE.RECORD$," ")-1) + _
"!" : _
GOSUB 12976 : _
GOTO 430
420 NEXT
'
' *****************************************************************************
' * TEST FOR REMOTE SYSOP LOGGING ON *
' *****************************************************************************
'
430 GET 1,NODE.RECORD.INDEX
LL = (ACTIVE.USER.NAME$ = LEFT$(MESSAGE.RECORD$,LEN(ACTIVE.USER.NAME$)))
IF FIRST.NAME$ = SYSOP.PASSWORD.1$ AND _
LAST.NAME$ = SYSOP.PASSWORD.2$ THEN _
UPPER.CASE = FALSE : _
CI$ = "REMOTE" : _
GOTO 827
'
' *****************************************************************************
' * TEST FOR SYSOP NAME ATTEMPT *
' *****************************************************************************
'
445 IF INSTR(ACTIVE.USER.NAME$,"SYSOP") OR _
INSTR(ACTIVE.USER.NAME$,SYSOP.FIRST.NAME$ + " " + SYSOP.LAST.NAME$) THEN _
LOGON.ERROR.INDEX = 2 : _
GOTO 10620
'
' *****************************************************************************
' * REMOVE INVALID CHARACTERS FROM USER NAME *
' *****************************************************************************
'
455 FOR J = 1 TO LEN(ACTIVE.USER.NAME$)
X = ASC(MID$(ACTIVE.USER.NAME$,J,1))
IF (X < 65 OR X > 90) AND _
(X <> 32 AND X <> 39 AND X <> 45 AND X <> 46) THEN _
GOTO 400
465 NEXT
'
' *****************************************************************************
' * CHECK FOR ACTIVE USER *
' *****************************************************************************
'
TEMP.USER.NAME$ = ACTIVE.USER.NAME$
GOSUB 12600
IF NOT FOUND THEN _
GOTO 700
GOSUB 12984
'
' *****************************************************************************
' * ACTIVE USER FOUND *
' *****************************************************************************
'
GOSUB 9500
USER.FILE.INDEX = LOC(2)
IF USER.SECURITY.LEVEL < MINIMUM.LOGON.SECURITY THEN _
GOTO 725
GOSUB 12989
CI$ = CITY.STATE$
ATTEMPTS.ALLOWED = 4
PASSWORD.SAVE$ = PASSWORD$
MESSAGE.PASSWORD = FALSE
IF CURRENT.DATE$ <> LEFT$(LAST.DATE.TIME.ON$,8) THEN _
ELAPSED.TIME = 0 _
ELSE ELAPSED.TIME = CVI(ELAPSED.TIME$)
480 IF Q = 3 THEN _
Z$ = B$(3) : _
ATTEMPTS = 1 : _
GOSUB 677 _
ELSE GOSUB 675
630 IF PASSWORD.FAILED THEN _
LOGON.ERROR.INDEX = 4 : _
GOTO 10620
643 GOSUB 41070
NEW.USER = FALSE
LMM$ = RIGHT$(STR$(ASC(MID$(LIST.NEW.DATE$,2))),2) + _ ' MM
"/" + _
RIGHT$(STR$(ASC(MID$(LIST.NEW.DATE$,3))),2) + _ ' DD
"/" + _
RIGHT$(STR$(ASC(LIST.NEW.DATE$)),2) ' YY
LM$ = RIGHT$(LMM$,2) + _ ' YY
LEFT$(LMM$,2) + _ ' MM
MID$(LMM$,4,2) ' DD
IF MID$(LM$,3,1) = " " THEN _
MID$(LM$,3,1) = "0"
655 IF MID$(LM$,5,1) = " " THEN _
MID$(LM$,5,1) = "0"
660 GOTO 800
'
' *****************************************************************************
' * USER & MESSAGE PASSWORD VALIDATION *
' *****************************************************************************
'
665 IF PASSWORD.SAVE$ = PASSWORD$ THEN _
PASSWORD.FAILED = 0 : _
RETURN
667 ATTEMPTS = 0
670 ATTEMPTS = ATTEMPTS + 1
IF ATTEMPTS > ATTEMPTS.ALLOWED THEN _
PASSWORD.FAILED = TRUE : _
RETURN
675 A$ = "Enter Password (dots will echo)"
GOSUB 45010
Z$ = B$(1)
677 IF LEN(Z$) > 15 THEN _
GOTO 680
CALL ALLCAPS (Z$)
Z$ = Z$ + SPACE$(15-LEN(Z$))
IF PASSWORD.SAVE$ = Z$ THEN _
PASSWORD.FAILED = 0 : _
RETURN
680 IF MESSAGE.PASSWORD THEN _
A$ = "Wrong password entered!" : _
GOSUB 12979
GOTO 670
'
' *****************************************************************************
' * ACTIVE USER NOT FOUND (NEWUSER ROUTINE) *
' *****************************************************************************
'
700 IF RESTRICT.BAUD = -2 AND BPS = -1 THEN _
LOGON.ERROR.INDEX = 7 : _
A$ = "(300 BAUD ACCESS FOR REGISTERED USERS ONLY) " : _
GOSUB 12976 : _
GOTO 10620
Z$ = FIRST.NAME$
GOSUB 12570
IF FOUND THEN _
GOSUB 12984 : _
GOTO 12595
Z$ = LAST.NAME$
GOSUB 12570
IF FOUND THEN _
GOSUB 12984 : _
GOTO 12595
710 IF USER.FILE.INDEX = 0 THEN _
GOTO 13540
720 NEW.USER = TRUE
GOSUB 9400
GOSUB 12630
LSET USER.NAME$ = "NEWUSER"
PUT 2,USER.FILE.INDEX
USER.SECURITY.LEVEL = DEFAULT.SECURITY.LEVEL
725 IF USER.SECURITY.LEVEL < MINIMUM.LOGON.SECURITY OR _
FIRST.NAME$ = LAST.NAME$ THEN _
LOGON.ERROR.INDEX = 3 : _
GOTO 10620
730 GOSUB 12950
USER.RECORD.SAVE$ = USER.RECORD$
BYPASS.TIME.CHECK = TRUE
FILE.NAME$ = NEWUSER.FILE$
STOP.INTERRUPTS = FALSE
GOSUB 1790
STOP.INTERRUPTS = TRUE
BYPASS.TIME.CHECK = FALSE
GOSUB 9400
LSET USER.RECORD$ = USER.RECORD.SAVE$
A$ = ACTIVE.USER.NAME$ + " from " + CITY.STATE$
GOSUB 12979
740 A$ = "<C>hange name/address, <D>isconnect (don't register), <R>egister"
GOSUB 12995
CALL ALLCAPS (B$(1))
Z$ = B$(1)
S = INSTR("CDR",Z$)
745 ON S GOTO 747,750,755
GOTO 740
747 Z$ = ACTIVE.USER.NAME$ + " from " + CI$ + " changed Name/Address"
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
LSET USER.NAME$ = STRING$(31,0)
PUT 2,USER.FILE.INDEX
GOSUB 12991
FF = FALSE
GOTO 400
'
' *****************************************************************************
' * D - COMMAND FROM NEWUSER ROUTINE (DISCONNECT - REFUSE TO REGISTER) *
' *****************************************************************************
'
750 Z$ = ACTIVE.USER.NAME$ + " of " + CI$ + " refused to register"
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
LSET USER.NAME$ = STRING$(31,0)
PUT 2,USER.FILE.INDEX
GOSUB 12991
FF = FALSE
USER.FILE.INDEX = 0
GOTO 13540
'
' *****************************************************************************
' * R - COMMAND FROM NEWUSER ROUTINE (REGISTER) *
' *****************************************************************************
'
755 GOSUB 12800
A$ = "Re-enter PASSWORD for verification (Dots will Echo)"
GOSUB 45010
SWAP Z$,B$(1)
CALL ALLCAPS (Z$)
IF B$(1) <> Z$ THEN _
A$ = "Passwords Don't match!" : _
GOSUB 12979 : _
GOTO 755
760 CALL ALLCAPS (Z$)
LSET PASSWORD$ = Z$
A$ = "Please REMEMBER your password"
GOSUB 12976
TEMP.SECURITY.LEVEL = USER.SECURITY.LEVEL
GOSUB 42950
BYPASS.TIME.CHECK = TRUE
GOSUB 43000
BYPASS.TIME.CHECK = FALSE
GOSUB 43030
GOSUB 42800
GOSUB 42700
GOSUB 12900
RIGHT.MARGIN = 64
EXPERT.USER = FALSE
GOSUB 9600
'
' *****************************************************************************
' * LOGIN ALL USERS *
' *****************************************************************************
'
800 MAIN.USER.FILE.INDEX = USER.FILE.INDEX
USER.SECURITY.SAVE = USER.SECURITY.LEVEL
A$ = "Logging " + ACTIVE.USER.NAME$
GOSUB 12975
TIMES.LOGGED.ON = CVI(MID$(USER.OPTIONS$,1,2)) + 1
GOSUB 9500
A1$ = LAST.DATE.TIME.ON$
A$ = "RBBS-PC VERSION " + _
VERSION.ID$ + _
" NODE " + _
NODE.ID$ + _
RETURN.LINE.FEED$ + _
" OPERATING AT " + _
BAUD.PARITY$
ATTEMPTS = 0
GOSUB 12976
815 DOWNLOADS = CVI(USER.DOWNLOADS$)
UPLOADS = CVI(USER.UPLOADS$)
LAST.MESSAGE.READ = -LAST.MESSAGE.READ*(LAST.MESSAGE.READ <= HIGH.MESSAGE.NUMBER)
LSET USER.OPTIONS$ = MKI$(TIMES.LOGGED.ON) + _
MID$(USER.OPTIONS$,3)
LSET LAST.DATE.TIME.ON$ = CURRENT.DATE$ + " " + TIME.LOGGED.ON$
PUT 2,USER.FILE.INDEX
GOSUB 12991
DEF SEG = 0
IF (PEEK(&H410) AND &H30) <> &H30 THEN _
DEF SEG : _
SCREEN ,,1,0 : _
CLS : _
GOSUB 33900 : _
SCREEN ,,0,0
DEF SEG
IF NOT LL THEN _
STOP.INTERRUPTS = WELCOME.INTERRUPTABLE : _
BYPASS.TIME.CHECK = TRUE : _
FILE.NAME$ = WELCOME.FILE$ : _
GOSUB 43030 : _
GOSUB 6000 : _
BYPASS.TIME.CHECK = FALSE : _
STOP.INTERRUPTS = FALSE
816 IF NEW.USER THEN _
BYPASS.TIME.CHECK = TRUE : _
GOSUB 1700 : _
BYPASS.TIME.CHECK = FALSE _
ELSE A$ = "Times on:" + STR$(TIMES.LOGGED.ON) : _
GOSUB 12979 : _
A$ = "Last time on was: " + A1$ : _
GOSUB 12979
817 IF REMIND.FILE.TRANSFERS THEN _
A$ = "Files Downloaded:" + _
STR$(DOWNLOADS) + _
" Uploaded:" + _
STR$(UPLOADS) : _
GOSUB 12977
820 IF REMIND.PROFILE THEN _
GOSUB 5400
825 CI$ = LEFT$(CI$ + SPACE$(2),INSTR(CI$ +SPACE$(2),SPACE$(2))-1)
GOTO 830
'
' *****************************************************************************
' * ESC PRESSED ON LOCAL CONSOLE ENTERS HERE *
' *****************************************************************************
'
826 CALL FINDTIME (USER.LOGON.TIME!)
GOSUB 14500
LOCAL.USER = TRUE
WAIT.BEFORE.DISCONNECT = 32400
IF LOCAL.PASSWORD$ <> "NONE" THEN _
LOCATE 24,1 : _
INPUT "Enter PASSWORD";Z$ : _
CALL ALLCAPS (Z$) : _
IF Z$ <> LOCAL.PASSWORD$ THEN _
GOTO 13549
EIGHT.BIT = TRUE
GR = 1
CI$ = "LOCAL"
LINE.FEEDS = TRUE
RETURN.LINE.FEED$ = LINE.FEED$
USER.SECURITY.LEVEL = SYSOP.SECURITY.LEVEL
827 FIRST.NAME$ = SYSOP.FIRST.NAME$
LAST.NAME$ = SYSOP.LAST.NAME$
ACTIVE.USER.NAME$ = "SYSOP"
USER.SECURITY.LEVEL = SYSOP.SECURITY.LEVEL
SYSOP = TRUE
RIGHT.MARGIN = 72
SUBROUTINE.PARAMETER = 1
CALL AMORPM
IF LOCAL.USER THEN _
SNOOP = TRUE : _
SYSOP.NEXT = TRUE : _
GOSUB 33090
830 IF USER.SECURITY.LEVEL <> DEFAULT.SECURITY.LEVEL THEN _
Z$ = "" : _
Z = 0 : _
GOSUB 5140 : _
IF FOUND THEN _
MINUTES.PER.SESSION! = TEMP.TIME.ALLOWED
836 IF LOCAL.USER THEN _
IF PRINTER THEN _
Z$= " Sysop on locally at "+CURRENT.DATE$+", "+TIM$ : _
CALL PRINTIT
837 IF NOT LOCAL.USER THEN _
Z$ = ACTIVE.USER.NAME$ + _
" on at " + _
CURRENT.DATE$ + _
", " + _
TIM$ + _
" from " + _
CI$ + _
", " + _
BAUD.PARITY$ : _
NG$ = Z$ + SPACE$(128-LEN(Z$)) : _
Z$ = " " + Z$ : _
CALL PRINTIT : _
IF NEW.USER THEN _
Z$ = "NEWUSER" : _
SUBROUTINE.PARAMETER = 1 : _
CALL UPDTCALR
NEW.USER = FALSE
842 SECONDS.PER.SESSION! = (MINUTES.PER.SESSION! + LIMIT.DAILY.TIME * ELAPSED.TIME) * 60
GOSUB 4910
CALLS.TODATE! = CALLS.TODATE! + 1 + SYSOP
GOSUB 24000
GET 1,NODE.RECORD.INDEX
MID$(MESSAGE.RECORD$,1,31) = ACTIVE.USER.NAME$ + SPACE$(31-LEN(ACTIVE.USER.NAME$))
MID$(MESSAGE.RECORD$,57,1) = "A"
MID$(MESSAGE.RECORD$,60,4) = BAUD.PARITY$
PUT 1,NODE.RECORD.INDEX
GOSUB 12985
IF SYSOP THEN _
GOTO 900 _
ELSE SYSOP = (USER.SECURITY.LEVEL >= SYSOP.SECURITY.LEVEL)
SUBROUTINE.PARAMETER = 2
850 CALL LINE25
IF USER.SECURITY.LEVEL < MAIN.FUNCTION (1) THEN _
GOTO 900
IF ACTIVE.BULLETINS < 1 THEN _
A$ = "There are no bulletins today" : _
GOSUB 1397 : _
GOTO 900
855 IF BULLETINS.OPTIONAL THEN _
A$ = "Would you like to skip the" + STR$(ACTIVE.BULLETINS) + " bulletins" : _
CALL SKIPLINE : _
GOSUB 12995 : _
IF YES THEN _
GOTO 900
860 GOSUB 9705
900 GOSUB 1900
SUBROUTINE.PARAMETER = 2
CALL LINE25
GOTO 955
955 GOSUB 4850
STOP.INTERRUPTS = TRUE
'
' *****************************************************************************
' * *
' * MAIN MENU PROCESSING *
' * *
' *****************************************************************************
'
1200 CLOSE 1
ACTIVE.MENU$ = "M"
SUBROUTINE.PARAMETER = 1
CALL LINE25
STOP.INTERRUPTS = TRUE
Q = 0
GOSUB 12979
IF USER.SECURITY.LEVEL < SYSOP.MENU.SECURITY.LEVEL THEN _
A1$ = ">" : _
GOTO 1240
A1$ = ",1,..,7>"
IF NOT EXPERT.USER THEN _
FILE.NAME$ = MENU$(1) : _
GOSUB 43025
1240 GOSUB 41050
NON.STOP = FALSE
IF NOT EXPERT.USER THEN _
FILE.NAME$ = MENU$(2) : _
GOSUB 43025
1250 SUBROUTINE.PARAMETER = 1
CALL LINE25
A$ = GRN$ + " Main Functions <B,C,D,E,F,G,H,I,J,K,L,O,P,Q,R,S,U,V,W,X,?" + A1$
CALL SKIPLINE
GOSUB 12995
IF Q = 0 THEN _
GOTO 1250
1270 FOR J = 1 TO Q
Z$ = B$(J)
CALL ALLCAPS (Z$)
FF = VAL(Z$)
IF FF = 0 THEN _
GOTO 1280
IF FF < 1 OR FF > 7 THEN _
GOSUB 1350 : _
GOTO 1200
1274 IF USER.SECURITY.LEVEL < SYSOP.FUNCTION(FF) THEN _
VIOLATION$ = "Sysop " + Z$ : _
GOSUB 1380 : _
GOTO 1200
1276 ON FF GOSUB 10070, _ ' 1) List comments file
10090, _ ' 2) List callers file
10390, _ ' 3) Recover a message
10530, _ ' 4) Erase comments
11000, _ ' 5) User file maintenance
33070, _ ' 6) Toggle page bell on/off
10930 ' 7) Exit to DOS 2.x or above
GOTO 1200
1280 FF = INSTR("BCDEFGHIJKLOPQRSUVWX?",Z$)
IF FF = 0 THEN _
GOSUB 1350 : _
GOTO 1200
1290 IF USER.SECURITY.LEVEL < MAIN.FUNCTION(FF) THEN _
VIOLATION$ = "MMenu " + Z$ : _
GOSUB 1380 : _
GOTO 1200
1320 ON FF GOSUB 9700, _ ' B)ulletins
1800, _ ' C)omments
10970, _ ' D)oor (exit to)
2000, _ ' E)nter a message
20015, _ ' F)ile system (exit to)
10560, _ ' G)oodbye
1740, _ ' H)elp (on line)
1760, _ ' I)nitial welcome redisplayed
5300, _ ' J)oin a conference
3900, _ ' K)ill a message
5200, _ ' L)ines per page
4700, _ ' O)perator page
1900, _ ' P)ersonal mail (look for)
4320, _ ' Q)uick scan of messages
4330, _ ' R)ead messages
4340, _ ' S)can messages
1330, _ ' U)tilities (exit to)
5800, _ ' V)iew a conference
9800, _ ' W)ho's on other nodes displayed
4240, _ ' X)Expert mode toggle on/off
1700 ' ?)Display main menu functions
NEXT
GOTO 1200
'
' *****************************************************************************
' * *
' * UTILITY MENU PROCESSING *
' * *
' *****************************************************************************
'
1330 ACTIVE.MENU$ = "U"
GOSUB 41050
IF NOT EXPERT.USER THEN _
FILE.NAME$ = MENU$(4) : _
GOSUB 43025
1334 SUBROUTINE.PARAMETER = 1
CALL LINE25
A$ = GRN$ + " Utility Functions <B,C,F,G,H,L,M,N,P,Q,R,S,T,U,X,!>"
CALL SKIPLINE
GOSUB 12995
IF Q = 0 THEN _
GOSUB 1350 : _
GOTO 1330
1336 Z$ = B$(J)
CALL ALLCAPS (Z$)
FF = INSTR("BCFGHLMNPQRSTUX!",Z$)
IF FF = 0 THEN _
GOSUB 1360 : _
GOTO 1330
IF USER.SECURITY.LEVEL < UTILITY.FUNCTION(FF) THEN _
VIOLATION$ = "Util " + Z$ : _
GOSUB 1380 : _
GOTO 1330
1338 ON FF GOSUB 5500, _ ' B)aud rate change 300==>450
42960, _ ' C)ase change (upper or upper/lower)
42800, _ ' F)ile transfer protocol
43000, _ ' G)raphics
1780, _ ' H)elp (on line)
4100, _ ' L)ine feeds (on or off)
10925, _ ' M)essage margin
42710, _ ' N)ulls (on or off)
5110, _ ' P)assword change
1200, _ ' Q)uit and exit to messages subsystem
5400, _ ' R)eview preferences
4850, _ ' S)tatistics displayed
9100, _ ' T)ime
10090, _ ' U)serlog displayed
4240, _ ' X)Expert mode toggle on/off
4200 ' !)Prompt sound toggle on/off
GOTO 1330
1350 IF EXPERT.USER THEN _
RETURN
GOSUB 12979
1360 A$ = B$(J) + " is invalid, " + FIRST.NAME$
GOSUB 12979
RETURN
'
' *****************************************************************************
' * RECORD SECURITY VIOLATIONS *
' *****************************************************************************
'
1380 A$ = "SYSOP must authorize"
GOSUB 1397
Z$ = "SV!-" + VIOLATION$
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
VIOLATIONS.THIS.SESSION = VIOLATIONS.THIS.SESSION + 1
IF MAXIMUM.VIOLATIONS = 0 OR VIOLATIONS.THIS.SESSION <= MAXIMUM.VIOLATIONS THEN _
RETURN
1385 IF USER.FILE.INDEX < 1 THEN _
RETURN
A$ = "SECURITY VIOLATION! Sysop can reinstate"
IF USER.SECURITY.LEVEL <= MINIMUM.LOGON.SECURITY THEN _
A$ = "" : _
USER.SECURITY.LEVEL = USER.SECURITY.LEVEL-1 _
ELSE USER.SECURITY.LEVEL = MINIMUM.LOGON.SECURITY
1386 GOSUB 12979
LOGON.ERROR.INDEX = 5
GOSUB 12989
GOSUB 9400
GET 2,USER.FILE.INDEX
LSET SECURITY.LEVEL$ = MKI$(USER.SECURITY.LEVEL)
PUT 2,USER.FILE.INDEX
GOTO 10620
1397 A$ = "Sorry, " + FIRST.NAME$ + ", " + A$
GOTO 12979
1398 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
RETURN
A$ = FIRST.NAME$ + ", your presence here is unacceptable."
GOSUB 12975
IF USER.FILE.INDEX < 1 THEN _
GOTO 10698
USER.SECURITY.LEVEL = MINIMUM.LOGON.SECURITY - 1
GOTO 1386
'
' *****************************************************************************
' * ? - COMMAND FROM MAIN MENU (FUNCTIONS SUPPORTED) *
' *****************************************************************************
'
1700 FILE.NAME$ = HELP$(2)
GOTO 1765
'
' *****************************************************************************
' * H - COMMAND FROM MAIN MENU (HELP) *
' *****************************************************************************
'
1740 FILE.NAME$ = HELP$(1)
GOTO 1765
'
' *****************************************************************************
' * I - COMMAND FROM MAIN MENU (DISPLAY INITIAL WELCOME) *
' *****************************************************************************
'
1760 FILE.NAME$ = WELCOME.FILE$
1765 GOSUB 1790
RETURN
'
' *****************************************************************************
' * H - COMMAND FROM UTILITIES MENU (HELP) *
' *****************************************************************************
'
1780 FILE.NAME$ = HELP$(8)
1790 GOSUB 43030
GOSUB 6000
RETURN
'
' *****************************************************************************
' * C - COMMAND FROM MAIN MENU (LEAVE COMMENT FOR SYSOP) *
' *****************************************************************************
'
1800 A$ = "Do you wish to leave a comment for " + _
SYSOP.FIRST.NAME$ + _
" (Y/N)"
CALL SKIPLINE
GOSUB 12995
RIGHT.MARGIN = 72
IF NOT YES THEN _
GOSUB 12979 : _
RETURN
1840 IF CONFERENCE.MODE THEN _
IF ACTIVE.USER.NAME$ = "SYSOP" THEN _
GOSUB 5360 _
ELSE GOSUB 5350
MESSAGE.TO$ = "SYSOP"
SUBJECT$ = "COMMENT"
IF (ACTIVE.MESSAGES > = MAXIMUM.MESSAGES OR _
NEXT.MESSAGE.RECORD + 5 > HIGHEST.MESSAGE.RECORD OR _
NOT COMMENTS.AS.MESSAGES ) THEN _
A$ = SYSOP.FIRST.NAME$ + " will NOT be able to reply." : _
GOSUB 12979 : _
A$ = "Do you still wish to leave a comment? (Y/N)" : _
CALL SKIPLINE : _
GOSUB 12995 : _
IF NOT YES THEN _
GOSUB 12979 : _
RETURN : _
ELSE SYSOP.COMMENT = TRUE : _
GOTO 2007
SYSOP.COMMENT = FALSE
SYSOP.MESSAGE = TRUE
GOTO 2010
1850 CLOSE 2
BX = &H3
EN$ = COMMENTS.FILE$
GOSUB 12992
IF SHARE.IT THEN _
OPEN COMMENTS.FILE$ FOR APPEND SHARED AS #2 _
ELSE OPEN "A",2,COMMENTS.FILE$
A$ = FIRST.NAME$ + ", Thanks for comments!"
GOSUB 12976
SUBROUTINE.PARAMETER = 2
CALL AMORPM
PRINT #2,ACTIVE.USER.NAME$,CURRENT.DATE$,TIM$
FOR X = 1 TO LINES.IN.MESSAGE
PRINT #2,A$(X)
NEXT
PRINT #2,CARRIAGE.RETURN$
CLOSE 2
BX = &H3
EN$ = COMMENTS.FILE$
GOSUB 12993
Z$ = "Left comment"
SUBROUTINE.PARAMETER = 1
CALL UPDTCALR
RETURN
'
' *****************************************************************************
' * P - COMMAND FROM MAIN MENU (DISPLAY PERSONAL MAIL) *
' *****************************************************************************
'
1900 GOSUB 30500
A$ = "Checking messages"
GOSUB 12978
SHOW.ACTIVE = TRUE
MESSAGES.FROM.USER = FALSE
ACTIVE.MESSAGES = 0
GOSUB 23000
MESSAGE.RECORD = FIRST.MESSAGE.RECORD
ACTIVE.DELAY! = 0
MAXIMUM.MESSAGES = VAL(MID$(MESSAGE.RECORD$,89,7))
FOR DF = 1 TO MAXIMUM.MESSAGES
M(DF,1) = 0
M(DF,2) = 0
NEXT
1905 GET 1,MESSAGE.RECORD
NUMBER.RECORDS.IN.MESSAGE = VAL(MID$(MESSAGE.RECORD$,118))
IF NUMBER.RECORDS.IN.MESSAGE < 1 THEN _
NUMBER.RECORDS.IN.MESSAGE = 1
1906 CALL FINDTIME (TI!)
IF SHOW.ACTIVE AND TI! > ACTIVE.DELAY! THEN _
A$ = "." : _
GOSUB 12978 : _
CALL FINDTIME (TI!) : _
ACTIVE.DELAY! = TI! + 1
1910 IF MESSAGE.RECORD >= NEXT.MESSAGE.RECORD THEN _
LOW.MESSAGE.NUMBER = M(1,2) : _
GOTO 1950
1915 IF MID$(MESSAGE.RECORD$,116,1) = DELETED.MESSAGE$ OR _
MID$(MESSAGE.RECORD$,116,1) <> ACTIVE.MESSAGE$ THEN _
GOTO 1946
1920 IF INSTR(MID$(MESSAGE.RECORD$,37,31),ACTIVE.USER.NAME$) OR _
(SYSOP AND INSTR(MID$(MESSAGE.RECORD$,37,31),"SYSOP")) OR _
(SYSOP AND INSTR(MID$(MESSAGE.RECORD$,37,31),SYSOP.FIRST.NAME$ + " " + SYSOP.LAST.NAME$)) THEN _
GOTO 1925
GOTO 1935
1925 IF SHOW.ACTIVE THEN _
A$ = "Mail may be for YOU (* = Private)" : _
GOSUB 12976 : _
SHOW.ACTIVE = FALSE
1930 A$ = LEFT$(MESSAGE.RECORD$,5)
GOSUB 12978
1935 IF INSTR(MID$(MESSAGE.RECORD$,6,31),ACTIVE.USER.NAME$) OR _
(SYSOP AND INSTR(MID$(MESSAGE.RECORD$,6,31),"SYSOP")) OR _
(SYSOP AND INSTR(MID$(MESSAGE.RECORD$,6,31),SYSOP.FIRST.NAME$ + " " + SYSOP.LAST.NAME$)) THEN _
GOTO 1940
GOTO 1945
1940 IF MESSAGES.FROM.USER < 128 THEN _
MESSAGES.FROM.USER = MESSAGES.FROM.USER + 1 : _
B$(MESSAGES.FROM.USER) = LEFT$(MESSAGE.RECORD$,5)
1945 ACTIVE.MESSAGES = ACTIVE.MESSAGES + 1
M(ACTIVE.MESSAGES,1) = MESSAGE.RECORD
M(ACTIVE.MESSAGES,2) = VAL(MID$(MESSAGE.RECORD$,2,4))
1946 MESSAGE.RECORD = MESSAGE.RECORD + NUMBER.RECORDS.IN.MESSAGE
GOTO 1905
1950 IF MESSAGES.FROM.USER = 0 OR NOT MESSAGE.REMINDER THEN _
RETURN
A$ = "Mail you may have left"
GOSUB 12976
1960 FOR I = 1 TO MESSAGES.FROM.USER
A$ = B$(I)
GOSUB 12978
NEXT
A$ = "Please <K>ill your old or unneeded messages"
GOSUB 12975
RETURN
'
' *****************************************************************************
' * E - COMMAND FROM MAIN MENU (ENTER MESSAGE) *
' *****************************************************************************
'
2000 IF ACTIVE.MESSAGES = MAXIMUM.MESSAGES THEN _
A$ = "Too many active messages! Leave a comment for Sysop! Try tomorrow" : _
GOSUB 12975 : _
GOTO 3650
2006 MESSAGE.PASSWORD$ = ""
SYSOP.COMMENT = FALSE
IF NOT REPLY THEN _
MESSAGE.TO$ = ""
2007 IF SYSOP.COMMENT THEN _
Z$ = COMMENTS.FILE$ : _
FT$ = "comment" _
ELSE Z$ = ACTIVE.MESSAGE.FILE$ : _
FT$ = "message"
2008 IF SYSOP.COMMENT THEN _
CALL FINDFREE : _
GOTO 2009
FREE.SPACE$ = "2000"
IF NEXT.MESSAGE.RECORD + 5 >= HIGHEST.MESSAGE.RECORD THEN _
FREE.SPACE$ = "1"
2009 IF VAL(FREE.SPACE$) < 2000 THEN _
A$ = "No room for " + FT$ : _
GOSUB 12979 : _
GOTO 3650
2010 LINES.IN.MESSAGE = 0
L = 0
X = 0
FOR I = 1 TO 30
A$(I) = ""
NEXT
IF SYSOP.COMMENT THEN _
GOTO 2100
IF SYSOP.MESSAGE THEN _
SYSOP.MESSAGE = FALSE : _
GOTO 2077
2020 IF REPLY THEN _
GOTO 2060
A$ = "To (Press [ENTER] for All)"
CALL SKIPLINE
GOSUB 12995
IF LEN(B$(1)) > 30 THEN _
A$ = "30 Char. Max" : _
GOSUB 12979 : _
GOTO 2020
2030 IF Q = 0 THEN _
MESSAGE.TO$ = "ALL" _
ELSE CALL ALLCAPS (B$(1)) : _
MESSAGE.TO$ = B$(1)
2035 A$ = "Subject"
GOSUB 12995
IF LEN(B$(1)) > 25 THEN _
A$ = "25 Char. Max" : _
GOSUB 12979 : _
GOTO 2035
2045 IF Q = 0 THEN _
GOTO 20095
CALL ALLCAPS (B$(1))
SUBJECT$ = B$(1)
2060 A$ = "Security: K)ill, P)assword, R)eceiver, N)one, H)elp, [ENTER]=Kill"
GOSUB 12995
IF Q = 0 THEN _
B$(1) = "K"
Z$ = LEFT$(B$(1),1)
CALL ALLCAPS (Z$)
ON INSTR("RKNPH",Z$) GOTO 2075,2090,2100,2088,2070
GOTO 2060
'
' *****************************************************************************
' * DISPLAY MESSAGE PROTECT HELP *
' *****************************************************************************
'
2070 FILE.NAME$ = HELP$(3)
GOSUB 1790
GOTO 2060
'
' *****************************************************************************
' * MAKE MESSAGE READ PROTECTED (ONLY ADDRESSEE AND SYSOP CAN READ IT) *
' *****************************************************************************
'
2075 IF MESSAGE.TO$ = "ALL" THEN _
A$ = "Message to ALL cannot be Receiver protected!" : _
GOSUB 12979 : _
GOTO 2060
2077 IF INSTR(MESSAGE.TO$,"SYSOP") OR _
INSTR(MESSAGE.TO$,SYSOP.FIRST.NAME$ + " " + SYSOP.LAST.NAME$) THEN _
GOTO 2081
2079 IF NOT REPLY THEN _
TEMP.USER.NAME$ = MESSAGE.TO$ : _
FOUND = FALSE : _
SUIX = USER.FILE.INDEX : _
GOSUB 12600 : _
USER.FILE.INDEX = SUIX : _
GOSUB 12984 : _
IF NOT FOUND THEN _
A$ = MESSAGE.TO$ + " is not an active user." : _
GOSUB 1397 : _
GOTO 2020
2081 A$ = "Sending personal mail to " + MESSAGE.TO$
GOSUB 12979
2084 MESSAGE.PASSWORD$ = "^READ^"
GOTO 2100
2085 A$ = "Password":'
GOSUB 12995
IF Q = 0 THEN _
GOTO 2085
IF LEN(B$(1)) > L THEN _
A$ = STR$(L) + " Chars. max" : _
GOSUB 12979 : _
GOTO 2085
IF L = 15 AND MID$(B$(1),1,1) = "!" THEN _
A$ = "Password can't begin with '!'" : _
GOSUB 12979 : _
GOTO 2085
RETURN
'
' *****************************************************************************
' * MAKE MESSAGE PASSWORD PROTECTED (USERS WITH PASSWORD AND SYSOP CAN READ) *
' *****************************************************************************
'
2088 A$ = "Receiver(s) Must KNOW PASSWORD TO READ msg. Use password (Y/N)"
GOSUB 12995
IF NO THEN _
GOTO 2070
L = 14
A1$ = "!"
GOSUB 2085
CALL ALLCAPS(B$(1))
GOTO 2092
'
' *****************************************************************************
' * MAKE MESSAGE KILL PROTECTED (ONLY SENDER, ADDRESSEE AND SYSOP CAN KILL) *
' *****************************************************************************
'
2090 L = 15
A1$ = ""
B$(1) = "^KILL^"
2092 MESSAGE.PASSWORD$ = A1$ + B$(1)
'
' *****************************************************************************
' * ENTER MAIN BODY OF MESSAGE *
' *****************************************************************************
'
2100 A$ = "Type " + _
FT$ + _
" Press [ENTER] to end," + _
STR$(MAX.MESSAGE.LINES) + _
" lines max)"
GOSUB 12975
GOSUB 3200
2125 LINES.IN.MESSAGE = LINES.IN.MESSAGE + 1
A$ = RIGHT$(STR$(LINES.IN.MESSAGE),2) + ": " + A$(LINES.IN.MESSAGE)
GOSUB 12978
GOSUB 3700
IF A$(LINES.IN.MESSAGE) = "" THEN _
LINES.IN.MESSAGE = LINES.IN.MESSAGE-1 : _
GOTO 2300
2140 J = LINES.IN.MESSAGE
GOSUB 2200
IF X THEN _
GOTO 2300
GOTO 2125
2200 X = 0
IF J < (MAX.MESSAGE.LINES-2) THEN _
RETURN
A$ = MID$("2 lines leftLast line Full",12*(J-(MAX.MESSAGE.LINES-2)) + 1,12)
X = (J > (MAX.MESSAGE.LINES-1))
2210 GOSUB 12979
RETURN
'
' *****************************************************************************
' * FINAL MESSAGE DISPOSITION *
' *****************************************************************************
'
2300 GOSUB 12979
IF NOT EXPERT.USER THEN _
GOSUB 50400
2315 A$ = "Editor Sub-function <A,C,D,E,I,L,M,S,?>"
CALL SKIPLINE
GOSUB 12995
IF Q = 0 THEN _
GOTO 2315
CALL ALLCAPS (B$(1))
Z$ = B$(1)
2325 IF Q > 1 AND Z$ <> "M" THEN _
L = VAL(B$(Q)) : _
GOSUB 3320
2330 ON INSTR("ACDEILMS?",Z$) GOTO 2400,2340,2500,2600,2800,3000,3100,3400,2345
GOTO 2300
'
' *****************************************************************************
' * CONTINUE ENTERING MESSAGE *
' *****************************************************************************
'
2340 GOSUB 3200
GOTO 2140
'
' *****************************************************************************
' * DISPLAY MESSAGE SUBCOMMANDS HELP FILE *
' *****************************************************************************
'
2345 FILE.NAME$ = HELP$(4)
GOSUB 1790
GOTO 2315
'
' *****************************************************************************
' * ABORT MESSAGE *
' *****************************************************************************
'
2400 A$ = "Abort " + FT$ + " (Y/N)"
CALL SKIPLINE
GOSUB 12995
IF NOT YES THEN _
GOTO 2300
2430 A$ = "Aborted"
GOSUB 12975
GOTO 3650
'
' *****************************************************************************
' * DELETE MESSAGE LINE *
' *****************************************************************************
'
2500 GOSUB 12979
IF Q = 1 THEN _
A$ = "Delete " : _
GOSUB 12978 : _
GOSUB 3300
2520 A$ = "Line #" + STR$(L)
GOSUB 12979
A$ = A$(L)
GOSUB 12977
A$ = "Delete this line (Y/N)"
GOSUB 12995
IF NOT YES THEN _
A$ = "NOT Deleted" : _
GOSUB 12979 : _
GOTO 2300
2550 LINES.IN.MESSAGE = LINES.IN.MESSAGE-1
FOR X = L TO LINES.IN.MESSAGE
A$(X) = A$(X + 1)
NEXT
A$(LINES.IN.MESSAGE + 1) = ""
A$ = "Deleted Line #" + STR$(L)
GOSUB 12979
GOTO 2300
'
' *****************************************************************************
' * EDIT MESSAGE LINE *
' *****************************************************************************
'
2600 GOSUB 12979
IF Q = 1 THEN _
GOSUB 3300
2620 A$ = "Line #" + STR$(L) + " is:" + RETURN.LINE.FEED$ + A$(L)
GOSUB 12977
A$ = "Enter <Oldstring;New> or Press [ENTER] to end"
GOSUB 12979
B$(2) = ""
GOSUB 12995
IF Q = 0 THEN _
GOTO 2300
2660 X = INSTR(1,A$(L),B$(1))
IF X = 0 THEN _
GOTO 2710
2670 FF = LEN(B$(1))
JJ = LEN(B$(2))
IF FF = JJ THEN _
MID$(A$(L),X) = B$(2) : _
GOTO 2620
2690 CC$ = MID$(A$(L),X + FF)
DF$ = LEFT$(A$(L),X-1)
A$(L) = DF$ + B$(2) + CC$
GOTO 2620
2710 A$ = "String <" + B$(1) + "> not found in line" + STR$(L)
GOSUB 12979
GOTO 2300
'
' *****************************************************************************
' * INSERT MESSAGE LINE *
' *****************************************************************************
'
2800 IF LINES.IN.MESSAGE >= MAX.MESSAGE.LINES AND NOT SYSOP THEN _
A$ = "Message full" : _
GOSUB 12979 : _
GOTO 2920
2820 GOSUB 12979
IF Q = 1 THEN _
A$ = "Before " : _
GOSUB 12978 : _
GOSUB 3300
2830 LL = LINES.IN.MESSAGE
K = LINES.IN.MESSAGE-L
FOR X = L TO LINES.IN.MESSAGE
B$(X + 1-L) = A$(X)
A$(X) = ""
NEXT
LINES.IN.MESSAGE = L
2840 A$ = RIGHT$(STR$(LINES.IN.MESSAGE),2) + ": "
GOSUB 12978
GOSUB 3700
IF A$(LINES.IN.MESSAGE) = "" THEN _
GOTO 2920
2870 LINES.IN.MESSAGE = LINES.IN.MESSAGE + 1
J = LINES.IN.MESSAGE + K-1
GOSUB 2200
IF X THEN _
GOTO 2920 _
ELSE GOTO 2840
2920 FOR X = 1 TO K + 1
A$(LINES.IN.MESSAGE + X-1) = B$(X)
NEXT
LINES.IN.MESSAGE = LL + LINES.IN.MESSAGE-L
GOTO 2300
'
' *****************************************************************************
' * LIST MESSAGE CONTENTS *
' *****************************************************************************
'
3000 STOP.INTERRUPTS = TRUE
GOSUB 12979
IF Q = 1 THEN _
L = 1 : _
A$ = "To: " + MESSAGE.TO$ + " Re: " + SUBJECT$ : _
GOSUB 12979 : _
GOSUB 3200
3020 FOR X = L TO LINES.IN.MESSAGE
IF RET THEN _
GOTO 2300 _
ELSE A$ = RIGHT$(STR$(X),2) + ": " + A$(X)
3030 GOSUB 12979
NEXT
GOTO 2300
'
' *****************************************************************************
' * CHANGE MARGIN WIDTH *
' *****************************************************************************
'
3100 GOSUB 12979
IF Q <> 1 THEN _
B$(1) = B$(Q) : _
GOTO 3130
3115 A$ = "SET Right-Margin from" + STR$(RIGHT.MARGIN) + " TO (8...72)"
GOSUB 12995
IF LEN(B$(1)) > 2 THEN _
GOTO 3140
3130 X = VAL(B$(1))
IF X > 7 AND X < 73 THEN _
RIGHT.MARGIN = X : _
A$ = "Margin now" + STR$(RIGHT.MARGIN) : _
GOTO 3150
3140 A$ = "Invalid - Margin UNCHANGED"
3150 GOSUB 12979
IF UTILITY.MARGIN.CHANGE THEN _
RETURN
GOTO 2300
3200 A$ = " [" + STRING$(RIGHT.MARGIN-2,45) + "]"
GOSUB 12975
RETURN
3300 A$ = "Line #"
GOSUB 12995
L = VAL(B$(1))
3320 IF L >= 1 AND L <= LINES.IN.MESSAGE THEN _
RETURN
3330 IF Q = 0 THEN _
RETURN 2300
3340 A$ = "No such line"
GOSUB 12979
RETURN 2300
'
' *****************************************************************************
' * SAVE MESSAGE *
' *****************************************************************************
'
3400 IF SYSOP.COMMENT THEN _
GOTO 1850
3405 GOSUB 4910
MESSAGE.RECORD.SAVE$ = MESSAGE.RECORD$
A$ = "Adding new msg #" + STR$(HIGH.MESSAGE.NUMBER + 1)
GOSUB 12978
REC = 0
N$ = ""
HIGH.MESSAGE.NUMBER = HIGH.MESSAGE.NUMBER + 1
ACTIVE.MESSAGES = ACTIVE.MESSAGES + 1
MESSAGE.NUMBER$ = STR$(HIGH.MESSAGE.NUMBER) + _
SPACE$(5-LEN(STR$(HIGH.MESSAGE.NUMBER)))
IF MESSAGE.PASSWORD$ = "^READ^" THEN _
MID$(MESSAGE.NUMBER$,1,1) = "*"
3460 MESSAGE.FROM$ = ACTIVE.USER.NAME$ + SPACE$(31-LEN(ACTIVE.USER.NAME$))
MESSAGE.TO$ = MESSAGE.TO$ + SPACE$(31-LEN(MESSAGE.TO$))
MID$(MESSAGE.TO$,23,8) = TIME$
SUBJECT$ = SUBJECT$ + SPACE$(25-LEN(SUBJECT$))
MESSAGE.PASSWORD$ = MESSAGE.PASSWORD$ + SPACE$(15-LEN(MESSAGE.PASSWORD$))
FOR J = 1 TO LINES.IN.MESSAGE
A$(J) = A$(J) + CHR$(227)
REC = REC + LEN(A$(J))
NEXT
IF REC MOD 128 = 0 THEN _
N$ = STR$(REC\128 + 1) _
ELSE N$ = STR$(REC\128 + 2)
3530 GET 1,NEXT.MESSAGE.RECORD
M(ACTIVE.MESSAGES,1) = NEXT.MESSAGE.RECORD
M(ACTIVE.MESSAGES,2) = HIGH.MESSAGE.NUMBER
LSET MESSAGE.RECORD$ = MESSAGE.NUMBER$ + _
MESSAGE.FROM$ + _
MESSAGE.TO$ + _
CURRENT.DATE$ + _
SUBJECT$ + _
MESSAGE.PASSWORD$ + _
ACTIVE.MESSAGE$ + _
N$
PUT 1,NEXT.MESSAGE.RECORD
NEXT.MESSAGE.RECORD = NEXT.MESSAGE.RECORD + VAL(N$)
N$ = ""
FOR J = 1 TO LINES.IN.MESSAGE
A$ = "."
GOSUB 12978
N$ = N$ + A$(J)
IF LEN(N$) > 127 THEN _
LSET MESSAGE.RECORD$ = N$ : _
PUT 1 : _
N$ = MID$(N$,129)
3630 NEXT
IF LEN(N$) > 0 THEN _
LSET MESSAGE.RECORD$ = N$ : _
PUT 1
3640 GOSUB 12979
LSET MESSAGE.RECORD$ = MESSAGE.RECORD.SAVE$
GOSUB 24000
GOSUB 12985
3650 IF REPLY THEN _
GOSUB 30500 : _
RETURN
GOTO 20095
'
' *****************************************************************************
' * ENTER MESSAGE/COMMENT LINES *
' *****************************************************************************
'
3700 RS$ = A$(LINES.IN.MESSAGE)
COL = LEN(RS$)
STOP.INTERRUPTS = FALSE
3720 COL = COL + 1
3730 IF LOCAL.USER THEN _
X$ = INPUT$(1) : _
GOTO 3740
3732 CALL FINDTIME (TI!)
AUTO.LOGOFF! = TI! + WAIT.BEFORE.DISCONNECT
WHILE EOF(3)
CALL FINDTIME (TI!)
IF TI! > AUTO.LOGOFF! THEN _
GOTO 10590
3733 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
GOSUB 60000
X$ = KEY.PRESSED$
IF LEN(X$) = 1 THEN _
AUTO.LOGOFF! = TI! + WAIT.BEFORE.DISCONNECT : _
GOTO 3740
3736 WEND
AUTO.LOGOFF! = TI! + WAIT.BEFORE.DISCONNECT
3737 X$ = INPUT$(1,3)
IF X$ = LINE.FEED$ OR _
X$ = CHR$(11) OR _
X$ = CHR$(12) THEN _
GOTO 3730
3738 IF X$ = CHR$(127) THEN _
GOTO 3870
3740 IF X$ = CHR$(8) OR _
X$ = CHR$(7) OR _
X$ = CHR$(26) OR _
X$ = CHR$(227) THEN _
GOTO 3870
3750 A$ = X$
GOSUB 12978
IF X$ = CARRIAGE.RETURN$ THEN _
GOTO 3850
3770 IF COL > RIGHT.MARGIN-3 AND X$ = " " THEN _
GOSUB 12979 : _
GOTO 3860
3780 RS$ = RS$ + X$
IF COL < RIGHT.MARGIN + 1 THEN _
GOTO 3720
3800 Z = LEN(RS$)
FOR I = 1 TO LEN(RS$)
IF MID$(RS$,Z,1) = " " THEN _
GOTO 3820
3810 Z = Z-1
NEXT
Z = LEN(RS$)-1
3820 COL = RIGHT.MARGIN + 1 - Z
IF SNOOP THEN _
LOCATE ,POS(0)-COL: _
PRINT STRING$(COL,32);
3830 IF NOT LOCAL.USER AND INP(MODEM.STATUS.REGISER) > 127 THEN _
PRINT #3,STRING$(COL,8) + STRING$(COL,32);
3840 A$(LINES.IN.MESSAGE) = LEFT$(RS$,Z)
A$(LINES.IN.MESSAGE + 1) = RIGHT$(RS$,COL)
GOSUB 12979
RETURN
3850 IF NOT LOCAL.USER AND LINE.FEEDS AND INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,LINE.FEED$;
3860 A$(LINES.IN.MESSAGE) = RS$
RETURN
3870 IF COL = 1 THEN _
GOTO 3730
COL = COL-2
RS$ = LEFT$(RS$,LEN(RS$)-1)
3880 IF SNOOP THEN _
PRINT BACK.ARROW$;
3885 IF NOT LOCAL.USER AND INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,BACKSPACE$;
3890 GOTO 3720
'
' *****************************************************************************
' * K - COMMAND FROM MAIN MENU (KILL MESSAGE) *
' *****************************************************************************
'
3900 KILL.MESSAGE = FALSE
GOSUB 12979
IF Q <> 1 THEN _
MESSAGE.TO.KILL = VAL(B$(Q)) : _
GOTO 3950
3930 A$ = "Msg # to Kill"
GOSUB 12995
MESSAGE.TO.KILL = VAL(B$(Q))
GOSUB 12979
3950 FOR QX = 1 TO ACTIVE.MESSAGES
IF M(QX,2) = MESSAGE.TO.KILL AND MESSAGE.TO.KILL >= 1 THEN _
GOTO 3970
3955 NEXT
GOSUB 3965
GOTO 4040
3965 A$ = "No such msg #" + STR$(MESSAGE.TO.KILL)
GOSUB 12979
RETURN
3970 GOSUB 12986
GOSUB 30500
GET 1,M(QX,1)
R = VAL(MID$(MESSAGE.RECORD$,118))
IF SYSOP THEN _
GOTO 4030
3980 Z$ = MID$(MESSAGE.RECORD$,101,15)
Z$ = LEFT$(Z$ + SPACE$(2),INSTR(Z$ +SPACE$(2),SPACE$(2))-1)
IF LEN(Z$) = 0 THEN _
GOTO 4030
3990 IF Z$ = "^READ^" OR Z$ = "^KILL^" THEN _
IF INSTR(MESSAGE.RECORD$,ACTIVE.USER.NAME$) THEN _
GOTO 4030 _
ELSE MESSAGE.PASSWORD = TRUE : _
ATTEMPTS.ALLOWED = 0 : _
A$ = "Only sender and receiver can kill": _
GOSUB 12979 : _
GOSUB 12987 : _
GOTO 4040
4000 IF LEFT$(Z$,1) = "!" THEN _
Z$ = MID$(Z$,2)
4010 PASSWORD.SAVE$ = Z$ + SPACE$(15-LEN(Z$))
ATTEMPTS.ALLOWED = 1
MESSAGE.PASSWORD = TRUE
GOSUB 667
IF PASSWORD.FAILED THEN _
GOSUB 12987 : _
GOTO 4040
4030 LSET MESSAGE.RECORD$ = LEFT$(MESSAGE.RECORD$,115) + _
DELETED.MESSAGE$ + _
MID$(MESSAGE.RECORD$,117)
PUT 1,LOC(1)
A$ = "Killed Msg # " + STR$(MESSAGE.TO.KILL)
GOSUB 12979
GOSUB 12987
4040 IF KILL.MESSAGE THEN _
RETURN
GOTO 20095
'
' *****************************************************************************
' * L - COMMAND FROM UTILITY MENU (LINE FEEDS TOGGLE) *
' *****************************************************************************
'
4100 LINE.FEEDS = NOT LINE.FEEDS
A$ = "Line Feeds " + MID$("OffOn",1-3*LINE.FEEDS,3)
CALL SETCRLF
IF USER.DATA THEN _
PRINT A$ : _
RETURN
GOSUB 12979
RETURN
'
' *****************************************************************************
' * P - COMMAND FROM UTILITY MENU (PROMPT BELL TOGGLE) *
' *****************************************************************************
'
4200 PROMPT.BELL = NOT PROMPT.BELL
A$ = "Prompting Bell " + MID$("OffOn",1-3*PROMPT.BELL,3)
IF USER.DATA THEN _
PRINT A$ : _
RETURN
GOSUB 12979
RETURN
'
' *****************************************************************************
' * X - COMMAND FROM MAIN MENU (EXPERT TOGGLE) *
' * X - COMMAND FROM UTILITY MENU (EXPERT TOGGLE) *
' * X - COMMAND FROM FILES MENU (EXPERT TOGGLE) *
' *****************************************************************************
'
4240 EXPERT.USER = NOT EXPERT.USER
A$ = MID$("NoviceExpert",1-6*EXPERT.USER,6)
IF USER.DATA THEN _
PRINT A$ : _
RETURN
GOSUB 12979
RETURN
'
' *****************************************************************************
' * Q - COMMAND FROM MAIN MENU (QUICK SCAN MESSAGES) *
' *****************************************************************************
'
4320 QUICK.SCAN.MESSAGES = TRUE
READ.MESSAGES = FALSE
SCAN.MESSAGES = FALSE
GOTO 4350
'
' *****************************************************************************
' * R - COMMAND FROM MAIN MENU (READ MESSAGES) *
' *****************************************************************************
'
4330 QUICK.SCAN.MESSAGES = FALSE
READ.MESSAGES = TRUE
SCAN.MESSAGES = FALSE
GOTO 4350
'
' *****************************************************************************
' * S - COMMAND FROM MAIN MENU (SCAN MESSAGE HEADERS) *
' *****************************************************************************
'
4340 QUICK.SCAN.MESSAGES = FALSE
READ.MESSAGES = FALSE
SCAN.MESSAGES = TRUE
'
' *****************************************************************************
' * MESSAGE READ MAINLINE (QUICK SCAN, READ & SCAN ALL USE THIS ROUTINE *
' *****************************************************************************
'
4350 GOSUB 30500
QAH = -READ.MESSAGES-QUICK.SCAN.MESSAGES-SCAN.MESSAGES*5
IF Q > 2 AND VAL(B$(Q)) = 0 THEN _
Z$ = B$(Q) : _
CALL ALLCAPS (Z$) : _
Q = Q-1 _
ELSE Z$ = ""
4360 LG$(11) = Z$
MESSAGES.SELECTED.INDEX = 1
NUMBER.MESSAGES.SELECTED = Q
ADDRESSED.TO.USER = FALSE
4370 MESSAGES.SELECTED.INDEX = MESSAGES.SELECTED.INDEX + 1
4371 IF MESSAGES.SELECTED.INDEX <= NUMBER.MESSAGES.SELECTED THEN _
CURRENT.MESSAGE = VAL(B$(MESSAGES.SELECTED.INDEX)) : _
GOTO 4415
4380 NON.STOP = FALSE
ADDRESSED.TO.USER = FALSE
A$ = "Msg # (" + _
STR$(LOW.MESSAGE.NUMBER) + _
" to" + _
STR$(M(ACTIVE.MESSAGES,2)) + _
", *, <H>elp)"
IF EXPERT.USER THEN _
GOTO 4400
4390 IF READ.MESSAGES THEN _
A$ = A$ + " to Retrieve (Press [ENTER] to end)" _
ELSE A$ = "Starting at " + A$
4400 GOSUB 12995
IF Q = 0 THEN _
GOTO 20095
IF INSTR("Hh",LEFT$(B$(1),1)) THEN _
FILE.NAME$ = HELP$(7) : _
GOSUB 1790 : _
RETURN
MESSAGES.SELECTED.INDEX = 0
NUMBER.MESSAGES.SELECTED = Q
GOTO 4370
4415 FORWARD = FALSE
REVERSE = FALSE
IF B$(MESSAGES.SELECTED.INDEX) = "*" THEN _
CURRENT.MESSAGE = LAST.MESSAGE.READ + 1 : _
FORWARD = TRUE : _
GOTO 4430
4416 IF INSTR("Mm",B$(MESSAGES.SELECTED.INDEX)) THEN _
ADDRESSED.TO.USER = TRUE : _
GOTO 4370
IF CURRENT.MESSAGE = 0 THEN _
GOTO 20095
GOSUB 12979
4430 IF RIGHT$(B$(MESSAGES.SELECTED.INDEX),1) = "+" THEN _
FORWARD = TRUE
IF RIGHT$(B$(MESSAGES.SELECTED.INDEX),1) = "-" THEN _
REVERSE = TRUE : _
GOTO 4490
4450 FOR MESSAGE.DIM.INDEX = 1 TO ACTIVE.MESSAGES
IF READ.MESSAGES AND _
M(MESSAGE.DIM.INDEX,2) = CURRENT.MESSAGE THEN _
GOTO 4520
4470 IF ((READ.MESSAGES AND FORWARD) OR QUICK.SCAN.MESSAGES OR SCAN.MESSAGES) AND _
M(MESSAGE.DIM.INDEX,2) >= CURRENT.MESSAGE THEN _
GOTO 4520
4480 NEXT
GOTO 4515
4490 FOR MESSAGE.DIM.INDEX = ACTIVE.MESSAGES TO 1 STEP -1
IF M(MESSAGE.DIM.INDEX,2) <= CURRENT.MESSAGE THEN _
GOTO 4540
4510 NEXT
4515 MESSAGE.TO.KILL = CURRENT.MESSAGE
GOSUB 3965
GOTO 4370
4520 ENDING.MESSAGE.INDEX = MESSAGE.DIM.INDEX
IF READ.MESSAGES AND NOT FORWARD THEN _
GOTO 4560
4530 STARTING.MESSAGE.INDEX = MESSAGE.DIM.INDEX
ENDING.MESSAGE.INDEX = ACTIVE.MESSAGES
SO = 1
GOTO 4550
4540 STARTING.MESSAGE.INDEX = MESSAGE.DIM.INDEX
ENDING.MESSAGE.INDEX = 1
SO = -1
4550 FOR MESSAGE.DIM.INDEX = STARTING.MESSAGE.INDEX TO _
ENDING.MESSAGE.INDEX STEP SO
4560 GET 1,M(MESSAGE.DIM.INDEX,1)
PASSWORD.FAILED = 0
UH = 0
Z$ = MID$(MESSAGE.RECORD$,101,15)
X = 1
4561 FF = INSTR(MID$(MESSAGE.RECORD$,X),ACTIVE.USER.NAME$)
IF FF THEN _
X = LEN(ACTIVE.USER.NAME$) + FF : _
IF (FF < 7 OR MID$(MESSAGE.RECORD$,FF-1,1) = " ") AND (X > 66 OR MID$(MESSAGE.RECORD$,X,1) = " ") THEN _
UH = TRUE _
ELSE IF FF < 37 THEN _
X = 37 : _
GOTO 4561
4562 IF NOT SYSOP THEN _
IF INSTR(MESSAGE.RECORD$,"^READ^") > 0 AND NOT UH THEN _
PASSWORD.FAILED = TRUE : _
IF FORWARD OR REVERSE THEN _
GOTO 4635
4563 CURRENT.MESSAGE = VAL(MID$(MESSAGE.RECORD$,2,4))
IF ADDRESSED.TO.USER AND NOT UH THEN _
GOTO 4625
4580 IF INSTR(MESSAGE.RECORD$,LG$(11)) = 0 THEN _
GOTO 4635
4581 IF MID$(MESSAGE.RECORD$,116,1) = DELETED.MESSAGE$ THEN _
GOTO 4630
4582 PG = FALSE
IF MID$(Z$,1,1) = "!" THEN _
IF NOT SYSOP THEN _
PG = TRUE : _
PASSWORD.SAVE$ = MID$(Z$,2) + " " : _
ATTEMPTS.ALLOWED = 0 : _
GOSUB 665
4584 IF PASSWORD.FAILED AND _
(QUICK.SCAN.MESSAGES OR (SCAN.MESSAGES AND NOT PG)) THEN _
GOTO 4635
4585 IF PASSWORD.FAILED THEN _
IF PG THEN _
SJ$ = "<PASSWORD>" _
ELSE SJ$ = "<PROTECTED>" _
ELSE SJ$ = MID$(MESSAGE.RECORD$,76,25)
4590 IF QUICK.SCAN.MESSAGES THEN _
A$ = LEFT$(MESSAGE.RECORD$,5) : _
A$ = LEFT$(A$ + SPACE$(2),INSTR(A$ +SPACE$(2),SPACE$(2))-1) : _
A$ = A$ + " " + SJ$ : _
GOSUB 12979 : _
GOTO 4630
4600 GOSUB 8000
IF SCAN.MESSAGES OR RET THEN _
GOTO 4630
IF M(MESSAGE.DIM.INDEX,2) > LAST.MESSAGE.READ THEN _
LAST.MESSAGE.READ = M(MESSAGE.DIM.INDEX,2)
4610 IF NOT PASSWORD.FAILED THEN _
GOTO 4613
IF PG THEN _
ATTEMPTS.ALLOWED = 2 : _
GOSUB 667
4611 IF PASSWORD.FAILED THEN _
GOTO 4625
4613 GOSUB 9000
GOSUB 12979
IF Q = 0 OR PAGE.LENGTH = 0 THEN _
GOTO 4625
4614 GOSUB 41000
KILL.MESSAGE = FALSE
REPLY = FALSE
IF NON.STOP THEN _
GOTO 4625
4616 A$ = "More (Y),N,NS,RE" + MID$(",K",1,-UH*2)
IF NOT EXPERT.USER THEN _
A$ = "More [Y]es,[N]o,[NS]non-stop,[RE]ply" + _
MID$(",[K]ill",1,-UH*7)
GOSUB 12995
IF NO THEN _
GOTO 4650
'
' *****************************************************************************
' * KILL CURRENT MESSAGE *
' *****************************************************************************
'
4618 IF KILL.MESSAGE AND (UH OR SYSOP) THEN _
IF USER.SECURITY.LEVEL >= MAIN.FUNCTION(10) THEN _
GOSUB 62520 : _
MESSAGE.TO.KILL = CURRENT.MESSAGE : _
GOSUB 3950 : _
GOSUB 62530 : _
GOTO 4625 _
ELSE VIOLATION$ = "MMenu R) Func 10" : _
GOSUB 1380 : _
GOTO 4625
'
' *****************************************************************************
' * REPLY TO CURRENT MESSAGE *
' *****************************************************************************
'
4620 IF NOT REPLY THEN _
GOTO 4625
4621 IF USER.SECURITY.LEVEL < MAIN.FUNCTION(4) THEN _
VIOLATION$ = "MMenu R) Func 4" : _
GOSUB 1380 : _
REPLY = FALSE : _
GOTO 4625
IF LEFT$(SUBJECT$,3) <> "(R)" THEN _
SUBJECT$ = "(R)" + LEFT$(SUBJECT$,22)
4622 MESSAGE.TO$ = MESSAGE.FROM$
MESSAGE.FROM$ = ACTIVE.USER.NAME$
GOSUB 62520
GOSUB 2000
REPLY = FALSE
GOSUB 62530
GOTO 4560
4625 IF NOT FORWARD AND NOT REVERSE THEN _
GOTO 4370
4630 IF PAGE.LENGTH = 0 THEN _
GOTO 4631
Q = Q + QAH
IF Q < PAGE.LENGTH THEN _
GOTO 4631
GOSUB 5600
IF NO THEN _
Q = 0 : _
GOTO 4650
Q = QAH
4631 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
IF RET THEN _
GOTO 20095
4635 NEXT
IF READ.MESSAGES THEN _
GOTO 4370
4650 GOSUB 12979
A$ = "End of Msgs"
GOSUB 12979
GOTO 20095
'
' *****************************************************************************
' * O - COMMAND FROM MAIN MENU (OPERATOR PAGE) *
' *****************************************************************************
'
4700 IF NOT SYSOP.AVAILABLE GOTO 4708
4705 A$ = "Chat. Remote Conversation"
GOSUB 12976
JJ = VAL(MID$(TIME$,1,2))*100 + VAL(MID$(TIME$,4,2))
IF (JJ > START.OFFICE.HOURS AND JJ < END.OFFICE.HOURS) OR SYSOP.ANNOY THEN _
GOTO 4710
4707 GOTO 4750
4708 A$ = "SYSOP is in from" + _
STR$(START.OFFICE.HOURS) + _
" to" + _
STR$(END.OFFICE.HOURS) + ","
GOSUB 12979
GOTO 4755
4710 A$ = "Page " + SYSOP.FIRST.NAME$ + " (Y/N)"
CALL SKIPLINE
GOSUB 12995
IF NO THEN _
RETURN
PAGE.COUNT = 0
A$ = "Paging " + SYSOP.FIRST.NAME$ + " now"
GOSUB 12978
CALL FINDTIME (PAGE.TIME.MAX!)
PAGE.TIME.MAX! = PAGE.TIME.MAX! + 30
4730 SUBROUTINE.PARAMETER = 1
CALL DELAYIT
4735 PAGE.COUNT = PAGE.COUNT + 1
IF INKEY$ = ESCAPE$ THEN _
GOTO 4765
4740 IF PAGE.COUNT MOD 2 THEN _
A$ = PAGING.PRINTER.SUPPORT$ + CHR$(7) : _
IF LEN(PAGING.PRINTER.SUPPORT$) = 3 THEN _
IF PRINTER THEN _
LPRINT CHR$(7);
4745 GOSUB 12978
CALL FINDTIME (TI!)
IF TI! < PAGE.TIME.MAX! THEN _
GOTO 4730
GOSUB 12979
4750 A$ = SYSOP.FIRST.NAME$ + " is in from" + _
STR$(START.OFFICE.HOURS) + _
" to" + _
STR$(END.OFFICE.HOURS) + _
", but not now"
GOSUB 1397
4755 A$ = "If you would like, Please leave a message or a comment"
GOSUB 12979
Z$ = "Operator paged " + LEFT$(TIME$ ,5)
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
RETURN
4765 Z$ = "Paged and chatted with Sysop"
SUBROUTINE.PARAMETER = 1
CALL UPDTCALR
A$ = "SYSOP available! Hi, " + _
FIRST.NAME$ + _
", this is " + _
SYSOP.FIRST.NAME$ + _
" go ahead!"
GOSUB 12976
4770 CM = TRUE
CALL FINDTIME (TIME.CHAT.STARTED!)
SUBROUTINE.PARAMETER = 1
CALL LINE25
4775 WHILE EOF(3)
LOCATE ,,1
GOSUB 60000
A$ = KEY.PRESSED$
IF A$ = CHR$(8) OR _
A$ = CHR$(7) OR _
A$ = CHR$(26) OR _
A$ = CHR$(127) OR _
A$ = CHR$(227) THEN _
GOTO 4805
4777 IF A$ = ESCAPE$ THEN _
A$ = "" : _
CM = 0 : _
CALL FINDTIME (TI!) : _
SECONDS.PER.SESSION! = SECONDS.PER.SESSION! + _
FIX(TI! - TIME.CHAT.STARTED!) : _
A$ = "Chat mode terminated. Returning to normal board operations." : _
GOSUB 12976 : _
GOTO 4820
4785 IF A$ = CARRIAGE.RETURN$ THEN _
GOTO 4811
4790 IF A$ <> "" THEN _
GOTO 4800
4795 WEND
4797 A$ = INPUT$(1,3)
IF A$ = CHR$(8) OR _
A$ = CHR$(127) THEN _
GOTO 4805 _
ELSE IF A$ = CARRIAGE.RETURN$ THEN _
GOTO 4811
4800 WORD.WRAP$ = WORD.WRAP$ + A$
IF LEN(WORD.WRAP$) = 78 THEN _
GOTO 4813 _
ELSE GOSUB 12978 : _
GOTO 4775
4805 IF POS(0) > 1 THEN _
PRINT BACK.ARROW$; : _
PRINT #3,BACKSPACE$; : _
QQ = LEN(WORD.WRAP$)-1 : _
WORD.WRAP$ = LEFT$(WORD.WRAP$,QQ)
4810 GOTO 4775
4811 IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,CARRIAGE.RETURN$;
PRINT CARRIAGE.RETURN$;
WORD.WRAP$ = ""
Q = 0
IF LINE.FEEDS AND INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,LINE.FEED$
GOTO 4775
4813 IF A$ = " " THEN _
WORD.WRAP$ = "" : _
Q = 0 : _
GOSUB 12977 : _
GOTO 4775
Z = LEN(WORD.WRAP$)
Q = 0
4814 IF MID$(WORD.WRAP$,Z,1) = " " THEN _
WORD.WRAP$ = MID$(WORD.WRAP$,Z + 1) _
ELSE Z = Z - 1 : _
Q = Q + 1 : _
IF Q >= 70 THEN _
GOTO 4811 _
ELSE GOTO 4814
4815 IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,STRING$(Q,8) + STRING$(Q,32) + CARRIAGE.RETURN$;
IF LINE.FEEDS AND INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,LINE.FEED$
4816 LOCATE ,POS(0)-Q
PRINT STRING$(Q,32) + CARRIAGE.RETURN$;
A$ = WORD.WRAP$
Q = 0
GOSUB 12978
GOTO 4775
4820 IF ACTIVE.MENU$ = "U" THEN _
RETURN 1330
IF ACTIVE.MENU$ = "F" THEN _
RETURN 20015
RETURN 1200
'
' *****************************************************************************
' * S - COMMAND FROM UTILITY MENU (STATISTICS) *
' *****************************************************************************
'
4850 A$ = "RBBS-PC Version " + VERSION.ID$ + " Node " + NODE.ID$
GOSUB 12975
IF NOT CONFERENCE.MODE THEN _
A$ = "Caller # " + STR$(CALLS.TODATE!) + " "
4855 A$ = A$ + "# active msgs:" + STR$(ACTIVE.MESSAGES)
A$ = A$ + " Next msg #" + STR$(HIGH.MESSAGE.NUMBER + 1)
LAST.MESSAGE.READ = -LAST.MESSAGE.READ * _
(LAST.MESSAGE.READ <= HIGH.MESSAGE.NUMBER)
IF LAST.MESSAGE.READ > 0 THEN _
A$ = A$ + " Last msg read:" + STR$(LAST.MESSAGE.READ)
4857 GOSUB 12976
IF SYSOP THEN _
USER.WORK = (HIGHEST.USER.RECORD * .95) + 1: _
A$ = "USERS: used" + _
STR$(CURRENT.USER.COUNT-1) + _
" avl" + _
STR$(USER.WORK - CURRENT.USER.COUNT) + _
" MSGS: used" + _
STR$(ACTIVE.MESSAGES) + _
" avl" + _
STR$(MAXIMUM.MESSAGES-ACTIVE.MESSAGES) + _
" MSG REC: used" + _
STR$(NEXT.MESSAGE.RECORD-1) + _
" avl" + _
STR$(HIGHEST.MESSAGE.RECORD + 1 + NODES.IN.SYSTEM - NEXT.MESSAGE.RECORD) : _
GOSUB 12976
4860 GOSUB 12979
RETURN
4900 CONFERENCE.MODE = TRUE
Z$ = "Entered " + GRN$
SUBROUTINE.PARAMETER = 1
CALL UPDTCALR
GRN$ = GRN$ + RETURN.LINE.FEED$
A$ = "Welcome to " + GRN$
GOSUB 12979
4905 CALL FINDIT
IF NOT OK THEN _
GOTO 4910
4906 GOSUB 43030
GOSUB 6000
4910 GOSUB 12986
GOSUB 30500
IF LOF(1) = 0 THEN _
DF$ = ACTIVE.MESSAGE.FILE$ : _
CLOSE 1 : _
KILL ACTIVE.MESSAGE.FILE$ : _
GOSUB 12987 : _
GOTO 13600
GOSUB 23000
RETURN
'
' *****************************************************************************
' * REMOVE NON ALPHA CHARACTERS FROM STRING *
' *****************************************************************************
'
5100 X$ = ""
FOR Z = 1 TO LEN(Z$)
IF ASC(MID$(Z$,Z,1)) < 65 OR ASC(MID$(Z$,Z,1)) > 90 THEN _
GOTO 5105
X$ = X$ + MID$(Z$,Z,1)
5105 NEXT
Z$ = X$
RETURN
'
' *****************************************************************************
' * P - COMMAND FROM UTILITY MENU (PASSWORD CHANGE) *
' *****************************************************************************
'
5110 A$ = "Enter new password"
GOSUB 45010
IF Q = 0 THEN _
RETURN
IF LEN(B$(1)) > 15 OR B$(1) = SPACE$(LEN(B$(1))) THEN _
GOTO 5110
CALL ALLCAPS (B$(1))
Z$ = B$(1)
5120 A$ = "Reenter new password"
GOSUB 45010
IF Q = 0 THEN _
RETURN
CALL ALLCAPS (B$(1))
IF Z$ <> B$(1) THEN _
A$ = "Passwords don't match!" : _
GOSUB 12979 : _
RETURN
5125 IF MAXIMUM.PASSWORD.CHANGES AND _
CHANGES.THIS.SESSION > _
MAXIMUM.PASSWORD.CHANGES AND _
NOT SYSOP THEN _
A$ = "No changes permitted" : _
GOSUB 12975 : _
RETURN _
ELSE PASSWORD.CHANGE.ALLOWED = TRUE : _
GOSUB 5140 : _
IF NOT FOUND THEN _
GOTO 5129 _
ELSE A$ = "Temporary change" : _
GOSUB 12975 : _
PASSWORD$ = TEMP.PASSWORD$ : _
SECONDS.PER.SESSION! = TEMP.TIME.ALLOWED * 60 : _
USER.SECURITY.LEVEL = TEMP.SECURITY.LEVEL : _
GOSUB 41070 : _
SYSOP = (USER.SECURITY.LEVEL >= SYSOP.SECURITY.LEVEL)
IF ACTIVE.USER.NAME$ = "SYSOP" THEN _
B$(1) = "********"
5126 Z$ = "Used temporary password " + B$(1)
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
GOSUB 12979
RETURN
5129 GOSUB 12989
GOSUB 9400
5130 GET 2,USER.FILE.INDEX
CALL ALLCAPS (B$(1))
LSET PASSWORD$ = B$(1)
PUT 2,USER.FILE.INDEX
CLOSE 2
GOSUB 12991
A$ = "Password changed"
STOP.INTERRUPTS = FALSE
GOSUB 12975
IF MAXIMUM.PASSWORD.CHANGES THEN _
CHANGES.THIS.SESSION = CHANGES.THIS.SESSION + 1
5131 Z$ = "New Password " + B$(1)
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
RETURN
'
' *****************************************************************************
' * SEARCH "PASSWORDS" FILE FOR TEMPORARY PASSWORDS *
' *****************************************************************************
'
5140 FOUND = FALSE
SWAP PASSWORDS.FILE$,FILE.NAME$
CALL OPENWORK
SWAP PASSWORDS.FILE$,FILE.NAME$
IF EC = 53 THEN _
Z$ = "Missing file " + PASSWORDS.FILE$ : _
SUBROUTINE.PARAMETER = 2 : _
CALL UPDTCALR : _
IF Z = 1 THEN _
CALL ALLCAPS (B$(1)) : _
Z$ = B$(1) : _
GOTO 5160 _
ELSE GOTO 5160
Z$ = Z$ + SPACE$(15-LEN(Z$))
5150 IF EOF(2) THEN _
GOTO 5160
5151 INPUT #2,TEMP.PASSWORD$,TEMP.SECURITY.LEVEL,TEMP.TIME.ALLOWED
IF LEN(TEMP.PASSWORD$) > 15 THEN _
GOTO 5150
TEMP.PASSWORD$ = TEMP.PASSWORD$ + SPACE$(15-LEN(TEMP.PASSWORD$))
IF Z$ <> TEMP.PASSWORD$ THEN _
GOTO 5150
IF PASSWORD.CHANGE.ALLOWED AND _
USER.SECURITY.LEVEL >= MINIMUM.SECURITY.FOR.TEMP.PASSWORD THEN _
FOUND = TRUE _
ELSE IF USER.SECURITY.LEVEL = TEMP.SECURITY.LEVEL THEN _
FOUND = TRUE _
ELSE 5150
5160 RETURN
'
' *****************************************************************************
' * L - COMMAND FROM MAIN MENU (LINES PER PAGE) *
' *****************************************************************************
'
5200 A$ = "CHANGE page length from" + _
STR$(PAGE.LENGTH) + _
" TO (0 =continuous, [ENTER]=no change)"
GOSUB 12995
IF Q = 0 THEN _
GOTO 1200
5230 A = VAL(B$(Q))
IF A < 0 OR A > 255 THEN _
GOTO 5200
PAGE.LENGTH = A
GOTO 1200
'
' *****************************************************************************
' * J - COMMAND FROM MAIN MENU (JOIN CONFERENCE) *
' *****************************************************************************
'
5300 FILE.NAME$ = CONFERENCE.MENU$
CALL FINDIT
IF NOT OK THEN _
A$ = "There are no Active Conferences available!" : _
GOSUB 12976 : _
GOTO 2210
5310 IF Q > 1 THEN _
B$(1) = B$(2) : _
Q = 0 : _
IF LEN(B$(2)) > 1 OR _
(LEN(B$(2)) = 1 AND NOT INSTR("JLMQX",B$(2))) THEN _
GOTO 5322 _
ELSE GOTO 5317
5312 IF EXPERT.USER THEN _
GOTO 5315
5313 FILE.NAME$ = CONFERENCE.MENU$
GOSUB 43025
5315 A$ = "Conference Function <J>oin, <L>ist, <M>ain, <Q>uit, <X>pert"
GOSUB 12995
IF Q = 0 THEN _
GOSUB 12979 : _
RETURN _
ELSE Z$ = B$(1)
5317 CALL ALLCAPS (B$(1))
IF B$(1) = "X" THEN _
GOSUB 4240 : _
GOTO 5312
FF = INSTR("JLMQ",B$(1))
IF FF = 0 THEN _
GOTO 5312
ON FF GOTO 5320,5313,5350,2210
5320 IF Q > 1 THEN _
B$(1) = B$(2) : _
GOTO 5322
A$ = "Enter conference name"
GOSUB 12995
IF Q = 0 THEN _
GOTO 5312
5322 IF SYSOP OR LOCAL.USER THEN _
GOSUB 5700
5323 CALL ALLCAPS (B$(1))
GRN$ = B$(1)
Q = 0
IF LEN(GRN$) > 7 THEN _
EXPERT.USER = FALSE : _
GOTO 5312
ACTIVE.MESSAGE.FILE$ = MID$(MAIN.MESSAGE.FILE$,1,2) + GRN$ + "M.DEF"
FILE.NAME$ = ACTIVE.MESSAGE.FILE$
CALL FINDIT
IF OK THEN _
GOTO 5324
ACTIVE.MESSAGE.FILE$ = MAIN.MESSAGE.FILE$
GRN$ = ""
GOTO 5312
5324 FILE.NAME$ = MID$(WELCOME.FILE$,1,2) + GRN$ + "W.DEF"
5325 IF ACTIVE.USER.NAME$ <> "SYSOP" THEN _
IF NOT (CONFERENCE.MODE AND (ACTIVE.USER.FILE$ = MAIN.USER.FILE$)) THEN _
GOSUB 12988 : _
GOSUB 9400 : _
GET 2,MAIN.USER.FILE.INDEX : _
GOSUB 9600 : _
PUT 2,MAIN.USER.FILE.INDEX : _
GOSUB 12990
5327 ACTIVE.USER.FILE$ = MID$(ACTIVE.USER.FILE$,1,2) + GRN$ + "U.DEF"
UPDATE.DATE = TRUE
Z$ = FILE.NAME$
FILE.NAME$ = ACTIVE.USER.FILE$
CALL FINDIT
FILE.NAME$ = Z$
IF OK THEN _
GOTO 5330
ACTIVE.USER.FILE$ = MAIN.USER.FILE$
UPDATE.DATE = FALSE
GOSUB 12986
GOSUB 30500
GET 1,1
MID$(MESSAGE.RECORD$,57,5) = STR$(CURRENT.USER.COUNT)
MID$(MESSAGE.RECORD$,62,5) = STR$(HIGHEST.USER.RECORD)
PUT 1,1
GOSUB 12987
TIX = MAIN.USER.FILE.INDEX
GOTO 5345
5330 IF ACTIVE.USER.NAME$ = "SYSOP" THEN _
GOTO 5345
TEMP.USER.NAME$ = ACTIVE.USER.NAME$
GOSUB 12600
GOSUB 12984
5340 IF FOUND THEN _
USER.FILE.INDEX = LOC(2) : _
TIX = USER.FILE.INDEX : _
GOSUB 9500 : _
GOTO 5345
A$ = "You are not a member of the " + GRN$ + " conference!"
GOSUB 1397
GRN$ = ""
USER.FILE.INDEX = MAIN.USER.FILE.INDEX
ACTIVE.USER.FILE$ = MAIN.USER.FILE$
ACTIVE.MESSAGE.FILE$ = MAIN.MESSAGE.FILE$
GOSUB 30500
GOSUB 23000
CONFERENCE.MODE = FALSE
GOSUB 12979
RETURN
5345 GRN$ = GRN$ + " Conference"
IF UPDATE.DATE AND ACTIVE.USER.NAME$ <> "SYSOP" THEN _
LSET LAST.DATE.TIME.ON$ = CURRENT.DATE$ + _
" " + _
TIME.LOGGED.ON$ : _
PUT 2,USER.FILE.INDEX : _
GOSUB 12991
5347 GOSUB 4900
GOSUB 12987
RETURN 900
5350 GRN$ = ""
Q = 0
IF ACTIVE.USER.NAME$ = "SYSOP" THEN _
GOSUB 5700 : _
ACTIVE.MESSAGE.FILE$ = MAIN.MESSAGE.FILE$ : _
ACTIVE.USER.FILE$ = MAIN.USER.FILE$ : _
CONFERENCE.MODE = FALSE : _
GOSUB 12979 : _
GOSUB 1900 : _
RETURN 1200
Z$ = "Exited Conference "
SUBROUTINE.PARAMETER = 1
CALL UPDTCALR
5360 IF CONFERENCE.MODE AND (ACTIVE.USER.FILE$ <> MAIN.USER.FILE$) THEN _
GOSUB 12988 : _
GOSUB 9400 : _
GET 2,TIX : _
GOSUB 9600 : _
PUT 2,TIX : _
GOSUB 12990
5362 IF CONFERENCE.MODE THEN _
ACTIVE.MESSAGE.FILE$ = MAIN.MESSAGE.FILE$ : _
ACTIVE.USER.FILE$ = MAIN.USER.FILE$ : _
CONFERENCE.MODE = FALSE : _
GOSUB 9400 : _
USER.FILE.INDEX = MAIN.USER.FILE.INDEX : _
GET 2,USER.FILE.INDEX : _
GOSUB 9500 : _
GOSUB 1900
GOSUB 12979
RETURN
'
' *****************************************************************************
' * R - COMMAND FROM UTILITY MENU (REVIEW PROFILE) *
' *****************************************************************************
'
5400 A$ = "Your PROFILE (utilities reset)"
GOSUB 12976
5410 EXPERT.USER = NOT EXPERT.USER
GOSUB 4240
GOSUB 43020
FF = INSTR("AMXC",USER.TRANSFER.DEFAULT$)
FF = FF-5*(FF < 1)
GOSUB 42810
UPPER.CASE = NOT UPPER.CASE
GOSUB 42960
LINE.FEEDS = NOT LINE.FEEDS
GOSUB 4100
GOSUB 42720
PROMPT.BELL = NOT PROMPT.BELL
GOTO 4200
'
' *****************************************************************************
' * B - COMMAND FROM UTILITY MENU (300 TO 450 BAUD CHANGE) *
' *****************************************************************************
'
5500 IF BPS <> -1 THEN _
A$ = "only 300 baud can change speed" : _
GOSUB 1397 : _
RETURN
5507 A$ = "Change to 450 baud"
GOSUB 12995
IF NOT YES THEN _
RETURN
5510 A$ = "Change. Then press [ENTER] until I respond"
GOSUB 12979
SUBROUTINE.PARAMETER = 9
CALL DELAYIT
C = 0
BAUD.RATE.DIVISOR = &H100
CALL SETBAUD
5530 C = C + 1
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
IF C = 20 THEN _
Z$ = "Baud change failed" : _
SUBROUTINE.PARAMETER = 1 : _
CALL UPDTCALR : _
GOTO 10595
SUBROUTINE.PARAMETER = 1
CALL DELAYIT
5535 IF EOF(3) THEN _
GOTO 5530
5536 IF ASC(INPUT$(1,3)) = 13 THEN _
GOTO 5540
5537 GOTO 5530
5540 Z$ = "Changed to 450 baud"
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
A$ = Z$
GOSUB 12979
BPS = -2
RETURN
'
' *****************************************************************************
' * PROVIDE (Y),N,NS MESSAGES FOR TEXT FILES LONGER THAN PAGE LENGTH *
' *****************************************************************************
'
5600 GOSUB 41000
CALL FINDTIME(AUTO.LOGOFF!)
AUTO.LOGOFF! = AUTO.LOGOFF! + WAIT.BEFORE.DISCONNECT
IF NON.STOP THEN _
RETURN _
ELSE A$ = "More (Y),N,NS" : _
GOSUB 12995 : _
RETURN
'
' *****************************************************************************
' * SAVE SYSOP LAST MESSAGE READ POINTER *
' *****************************************************************************
'
5700 GOSUB 12986
GOSUB 30500
GET 1,1
MID$(MESSAGE.RECORD$,123,4)=MID$(STR$(LAST.MESSAGE.READ),2)
PUT 1,1
GOSUB 12985
RETURN
'
' *****************************************************************************
' * V - COMMAND FROM MAIN MENU (VIEW CONFERENCES) *
' *****************************************************************************
'
5800 A$ = "The V)iew Conferences command has not been implemented!"
GOSUB 12976
RETURN
'
' *****************************************************************************
' * DISPLAY TEXT FILES & SCAN DIRECTORIES *
' *****************************************************************************
'
6000 IF STOP.INTERRUPTS THEN _
A$ = "* <Ctrl K> or <Ctrl X> aborts <Ctrl S> suspends *" : _
GOSUB 12976
6020 CK = 0
GOTO 7100
6030 Q = -1
CK = 0
GOTO 7110
6080 A$ = "Missing file " + FILE.NAME$ + ". Please tell SYSOP"
GOSUB 12979
RETURN
'
' *****************************************************************************
' * SCAN DIRECTORIES (PRINT TEXT) *
' *****************************************************************************
'
7000 A$ = "Scanning Directory " + _
MID$(FILE.NAME$,3,INSTR(FILE.NAME$,".")-3) + _
" for " + _
A1$
GOSUB 12979
PG = TRUE
7100 CALL OPENWORK
IF EC = 53 THEN _
Z$ = "Missing File " + FILE.NAME$ : _
SUBROUTINE.PARAMETER = 2 : _
CALL UPDTCALR : _
GOTO 6080
Q = 0
FF = PAGE.LENGTH-1
7110 IF EOF(2) OR (INP(MODEM.STATUS.REGISTER) < 128 AND NOT LOCAL.USER) THEN _
GOTO 7260
7120 IF PAGE.LENGTH AND Q >= 0 THEN _
IF Q >= FF THEN _
GOSUB 5600 : _
IF NO THEN _
GOTO 7260 _
ELSE Q = 0
7130 LINE INPUT #2,A$
IF CK = 0 THEN _
GOTO 7250
7157 IF CK > 1 THEN _
CALL ALLCAPS (A$) : _
Z$ = A$ : _
XXX = (INSTR(Z$,RS$) = 0) : _
GOTO 7190
7160 A = INSTR(9,MID$(A$,1,32),"/")
IF A = 0 THEN _
A = INSTR(9,MID$(A$,1,32),"-")
7162 IF A < 3 THEN _
GOTO 7110
IF INSTR("0123456789",MID$(A$,A-1,1)) = 0 THEN _
GOTO 7110
A = A-2
KEE$ = RIGHT$(MID$(A$,A,8),2) + _
LEFT$(MID$(A$,A,8),2) + _
MID$(MID$(A$,A,8),4,2)
IF MID$(KEE$,3,1) = " " THEN _
MID$(KEE$,3,1) = "0"
7185 IF MID$(KEE$,5,1) = " " THEN _
MID$(KEE$,5,1) = "0"
7189 XXX = (KEE$ < RS$)
7190 IF XXX THEN _
GOTO 7110
IF PG THEN _
PG = FALSE : _
CALL OPENWORK : _
Q = 0 : _
GOTO 7110
7200 IF PG THEN _
GOTO 7110
7250 GOSUB 12979
Q = Q-(Q >= 0)
IF NOT RET THEN _
GOTO 7110
7260 A$ = ""
Q = 0
CLOSE 2
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
RETURN
'
' *****************************************************************************
' * FORMAT MESSAGE HEADER INFORMATION FOR DISPLAY *
' *****************************************************************************
'
8000 GOSUB 12979
IF RET THEN _
RETURN
8020 IF MID$(MESSAGE.RECORD$,37,5) = "ALL " THEN _
MESSAGE.TO$ = "ALL" : _
GOTO 8040
8030 MESSAGE.TO$ = MID$(MESSAGE.RECORD$,37,22)
MESSAGE.TO$ = LEFT$(MESSAGE.TO$ + SPACE$(2),INSTR(MESSAGE.TO$ +SPACE$(2),SPACE$(2))-1)
8040 SUBJECT$ = MID$(MESSAGE.RECORD$,76,25)
SUBJECT$ = LEFT$(SUBJECT$ + SPACE$(2),INSTR(SUBJECT$ +SPACE$(2),SPACE$(2))-1)
IF PASSWORD.FAILED THEN _
SUBJECT$ = SJ$
8050 MESSAGE.FROM$ = MID$(MESSAGE.RECORD$,6,31)
MESSAGE.FROM$ = LEFT$(MESSAGE.FROM$ + SPACE$(2),INSTR(MESSAGE.FROM$ +SPACE$(2),SPACE$(2))-1)
A$ = "Msg # " + _
LEFT$(MESSAGE.RECORD$,5) + _
" Dated " + _
MID$(MESSAGE.RECORD$,68,8) + _
" " + _
MID$(MESSAGE.RECORD$,59,8)
IF NOT RET THEN _
A$ = A$ + _
RETURN.LINE.FEED$ + _
" From: " + _
MESSAGE.FROM$ + _
RETURN.LINE.FEED$ + _
" To: " + _
MESSAGE.TO$ + _
RETURN.LINE.FEED$ + _
" Re: " + _
SUBJECT$
IF NOT READ.MESSAGES THEN _
GOTO 8080
IF ADDRESSED.TO.USER THEN _
GOTO 8076
IF MESSAGE.TO$ = "ALL" THEN _
GOTO 8080
IF NOT SYSOP THEN _
GOTO 8080
IF INSTR(MESSAGE.TO$,"SYSOP") > 0 OR _
INSTR(MESSAGE.TO$,SYSOP.FIRST.NAME$ + " " + SYSOP.LAST.NAME$) > 0 THEN _
GOTO 8076
GOTO 8080
8076 IF MID$(MESSAGE.RECORD$,123,6) = STRING$(6,0) OR _
MID$(MESSAGE.RECORD$,123,6) = SPACE$(6) THEN _
GOTO 8077
YY$= RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,126,1))),2)+ ":" + _
RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,127,1))),2)+ ":" + _
RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,128,1))),2)
FOR I = 1 TO 8
IF MID$(YY$,I,1) = " " THEN _
MID$(YY$,I,1) = "0"
NEXT
YY$ = YY$ + " on "
YY$ = YY$ + _
RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,123,1))),2)+ "/" + _
RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,124,1))),2)+ "/" + _
RIGHT$(STR$(ASC(MID$(MESSAGE.RECORD$,125,1))),2)
FOR I = 13 TO 20
IF MID$(YY$,I,1) = " " THEN _
MID$(YY$,I,1) = "0"
NEXT
A$ = A$ + " Last read at " + YY$
8077 YY$ = DATE$
ZZ$ = TIME$
MID$(MESSAGE.RECORD$,123,6) = CHR$(VAL(MID$(YY$,1,2))) + _
CHR$(VAL(MID$(YY$,4,2))) + _
CHR$(VAL(MID$(YY$,9,2))) + _
CHR$(VAL(MID$(ZZ$,1,2))) + _
CHR$(VAL(MID$(ZZ$,4,2))) + _
CHR$(VAL(MID$(ZZ$,7,2)))
GOSUB 12986
PUT 1,M(MESSAGE.DIM.INDEX,1)
GOSUB 12987
8080 GOSUB 12979
RETURN
'
' *****************************************************************************
' * UNCOMPRESS MESSAGE PRIOR TO DISPLAY *
' *****************************************************************************
'
9000 GOSUB 12979
Q = 4
FOR X = 2 TO VAL(MID$(MESSAGE.RECORD$,118))
GOSUB 12978
EOL = FALSE
J = 1
GET 1
9050 B = INSTR(J,MESSAGE.RECORD$,CHR$(227))
IF RET THEN _
RETURN
9060 C = B-J
IF C < 0 THEN _
C = 128 : _
EOL = TRUE
9070 A$ = MID$(MESSAGE.RECORD$,J,C)
IF EOL THEN _
GOTO 9090
9085 J = B + 1
GOSUB 57100
GOTO 9050
9090 NEXT
A$ = ""
RETURN
'
' *****************************************************************************
' * T - COMMAND FROM UTILITY MENU (TIME ON SYSTEM) *
' *****************************************************************************
'
9100 GOSUB 12979
GOSUB 9140
SUBROUTINE.PARAMETER = 2
CALL AMORPM
A$ = "Now " + TIM$ + " Time on: "
IF HHH > 0 THEN _
A$ = A$ + STR$(HHH) + " Hrs"
9110 A$ = A$ + STR$(MMM) + " Min &" + STR$(SSS) + " Sec"
GOSUB 12979
RETURN
9140 H = VAL(MID$(TIME.LOGGED.ON$,1,2))
M = VAL(MID$(TIME.LOGGED.ON$,4,2))
S = VAL(MID$(TIME.LOGGED.ON$,7,2))
HH = VAL(MID$(TIME$ ,1,2))
MM = VAL(MID$(TIME$ ,4,2))
JJ = VAL(MID$(TIME$ ,7,2))
IF S <= JJ THEN _
SSS = JJ-S _
ELSE SSS = 60-(S-JJ) : _
M = M + 1
9150 IF M <= MM THEN _
MMM = MM-M _
ELSE MMM = 60-(M-MM) : _
H = H + 1
9160 IF H <= HH THEN _
HHH = HH-H : _
RETURN _
ELSE HHH = 24-(H-HH) : _
RETURN
'
' *****************************************************************************
' * OPEN AND DEFINE USER FILE RECORD VARIABLES *
' *****************************************************************************
'
9400 CLOSE 2
IF SHARE.IT THEN _
OPEN ACTIVE.USER.FILE$ FOR RANDOM SHARED AS #2 LEN=128 _
ELSE OPEN "R",2,ACTIVE.USER.FILE$,128
FIELD 2,31 AS USER.NAME$, _
15 AS PASSWORD$, _
2 AS SECURITY.LEVEL$, _
14 AS USER.OPTIONS$, _
24 AS CITY.STATE$, _
19 AS MACHINE.TYPE$, _
14 AS LAST.DATE.TIME.ON$, _
3 AS LIST.NEW.DATE$, _
2 AS USER.DOWNLOADS$, _
2 AS USER.UPLOADS$, _
2 AS ELAPSED.TIME$
FIELD 2,128 AS USER.RECORD$
RETURN
'
' *****************************************************************************
' * GET USER DEFAULTS *
' *****************************************************************************
'
9500 USER.SECURITY.LEVEL = CVI(SECURITY.LEVEL$)
LAST.MESSAGE.READ = CVI(MID$(USER.OPTIONS$,3,2))
USER.TRANSFER.DEFAULT$ = MID$(USER.OPTIONS$,5,1)
GR = VAL(MID$(USER.OPTIONS$,6,1))
IF NOT EIGHT.BIT THEN _
GR = 0
USER.GRAPHIC.DEFAULT$ = MID$(" GC",GR + 1,-(GR > 0))
RIGHT.MARGIN = CVI(MID$(USER.OPTIONS$,7,2))
9510 USER.OPTIONS = CVI(MID$(USER.OPTIONS$,9,2))
PROMPT.BELL = (USER.OPTIONS AND 1) > 0
EXPERT.USER = (USER.OPTIONS AND 2) > 0
NULLS = (USER.OPTIONS AND 4) > 0
UPPER.CASE = (USER.OPTIONS AND 8) > 0
LINE.FEEDS = (USER.OPTIONS AND 16) > 0
PAGE.LENGTH = ASC(MID$(USER.OPTIONS$,13))
9520 NUL$ = MID$(STRING$(5,0),1,-5*NULLS)
CALL SETCRLF
RETURN
'
' *****************************************************************************
' * UPDATE USER DEFAULTS *
' *****************************************************************************
'
9600 LSET USER.OPTIONS$ = MKI$(TIMES.LOGGED.ON) + _
MKI$(LAST.MESSAGE.READ) + _
USER.TRANSFER.DEFAULT$ + _
MID$(STR$(GR),2,1) + _
MKI$(RIGHT.MARGIN) + _
MKI$(-PROMPT.BELL-2*EXPERT.USER-4*NULLS-8*UPPER.CASE-16*LINE.FEEDS) + _
MKI$(0) + _
CHR$(PAGE.LENGTH) + _
STRING$(1,0)
RETURN
'
' *****************************************************************************
' * B - COMMAND FROM MAIN MENU (READ BULLETINS) *
' *****************************************************************************
'
9700 IF ACTIVE.BULLETINS < 1 THEN _
A$ = "no bulletins today" : _
GOSUB 1397 : _
RETURN
9705 FILE.NAME$ = BULLETIN.MENU$
GOSUB 1790
9707 GOSUB 41000
NON.STOP = FALSE
A$ = "Bulletin # 1 thru" + STR$(ACTIVE.BULLETINS) + _
", L)ist, Press [ENTER] to Continue"
CALL SKIPLINE
GOSUB 12995
IF Q = 0 THEN _
GOSUB 12979 : _
RETURN
9708 CALL ALLCAPS (B$(1))
IF B$(1) = "L" THEN _
GOTO 9705
9711 Z$ = B$(1)
IF VAL(Z$) > 0 AND VAL(Z$) <= ACTIVE.BULLETINS THEN _
GOTO 9720
GOTO 9705
9720 WHILE LEFT$(B$(1),1) = " "
B$(1) = MID$(B$(1),2)
WEND
Z$ = "Read Bulletin # " + B$(1)
SUBROUTINE.PARAMETER = 1
CALL UPDTCALR
CALL ALLCAPS (B$(1))
FILE.NAME$ = BULLETIN.PREFIX$ + B$(1)
STOP.INTERRUPTS = TRUE
GOSUB 1790
STOP.INTERRUPTS = FALSE
GOSUB 41050
GOTO 9707
'
' *****************************************************************************
' * W - COMMAND FROM MAIN MENU (WHO'S ON THE OTHER NODES) *
' *****************************************************************************
'
9800 IF CONFERENCE.MODE THEN _
A$ = "Nodes won't display within a conference!" : _
GOSUB 12977 : _
RETURN
GOSUB 12979
GOSUB 30500
FOR NODE.INDEX = 2 TO NODES.IN.SYSTEM + 1
GET 1,NODE.INDEX
A$ = MID$(MESSAGE.RECORD$,1,31) + _
"Node" + _
STR$(NODE.INDEX - 1) + _
LEFT$(" in",1-2*(MID$(MESSAGE.RECORD$,57,1) <> "A")) + _
"active " + _
MID$(MESSAGE.RECORD$,60,4) + _
" Baud"
GOSUB 12979
NEXT
RETURN
'
' *****************************************************************************
' * 1 - COMMAND FROM SYSOP MENU (DISPLAY COMMENTS) *
' *****************************************************************************
'
10070 FILE.NAME$ = COMMENTS.FILE$
GOSUB 6000
RETURN
'
' *****************************************************************************
' * U - COMMAND FROM UTILITY MENU (DISPLAY USERS) *
' * 2 - COMMAND FROM SYSOP MENU (DISPLAY USERS) *
' *****************************************************************************
'
10090 A$ = "List - <U>sers, <R>ecent callers, Press [ENTER] to quit"
CALL SKIPLINE
GOSUB 12995
IF Q = 0 THEN _
RETURN
CALL ALLCAPS (B$(1))
ON INSTR("UR",B$(1)) + 1 GOTO 10090,10096,10100
10096 GOSUB 12700
GOSUB 9400
STOP.INTERRUPTS = TRUE
Q = 0
FOR I = 1 TO HIGHEST.USER.RECORD-1
GET 2,I
IF ASC(USER.NAME$) = 0 OR LEFT$(USER.NAME$,3) = " " THEN _
GOTO 10099
A$ = LEFT$(USER.NAME$,20) + _
CITY.STATE$ + _
MACHINE.TYPE$ + _
LAST.DATE.TIME.ON$
GOSUB 12979
IF RET THEN _
RETURN
GOSUB 57110
10099 NEXT
STOP.INTERRUPTS = FALSE
RETURN
10100 GOTO 57000
'
' *****************************************************************************
' * 3 - COMMAND FROM SYSOP MENU (RECOVER MESSAGE) *
' *****************************************************************************
'
10390 A$ = "Recover Msg #"
GOSUB 12995
MESSAGE.TO.RECOVER = VAL(B$(1))
IF MESSAGE.TO.RECOVER < 1 THEN _
GOTO 12980
10410 MESSAGE.RECORD = FIRST.MESSAGE.RECORD
GOSUB 12979
GOSUB 30500
10420 GET 1,MESSAGE.RECORD
NUMBER.RECORDS.IN.MESSAGE = VAL(MID$(MESSAGE.RECORD$,118))
IF NUMBER.RECORDS.IN.MESSAGE < 1 THEN _
A$ = "USE CONFIG OPTION 145 TO FIX YOUR MESSAGE FILE" : _
GOSUB 12979 : _
RETURN
IF MESSAGE.RECORD >= NEXT.MESSAGE.RECORD THEN _
A$ = "No Msg #" + STR$(MESSAGE.TO.RECOVER) : _
GOSUB 12979 : _
RETURN
10440 IF VAL(MID$(MESSAGE.RECORD$,2,4)) <> MESSAGE.TO.RECOVER THEN _
MESSAGE.RECORD = MESSAGE.RECORD + NUMBER.RECORDS.IN.MESSAGE : _
GOTO 10420
10450 IF INSTR(MESSAGE.RECORD$,DELETED.MESSAGE$) <> 0 THEN _
GOSUB 12986 : _
LSET MESSAGE.RECORD$ = LEFT$(MESSAGE.RECORD$,115) + _
ACTIVE.MESSAGE$ + _
MID$(MESSAGE.RECORD$,117) : _
PUT 1,LOC(1) : _
GOSUB 12987 : _
A$ = "Restored Msg #" + STR$(MESSAGE.TO.RECOVER) : _
GOSUB 12979 : _
GOTO 10490
10480 A$ = "Msg #" + STR$(MESSAGE.TO.RECOVER) + " not Dead"
GOSUB 12979
RETURN
10490 A$ = "Re-Loading Msg File"
GOSUB 12979
GOSUB 1900
RETURN
'
' *****************************************************************************
' * 4 - COMMAND FROM SYSOP MENU (DELETE COMMENTS) *
' *****************************************************************************
'
10530 A$ = "Delete comments (Y/N)"
GOSUB 12995
IF YES THEN _
CLOSE 2 : _
IF SHARE.IT THEN _
OPEN COMMENTS.FILE$ FOR OUTPUT SHARED AS #2 _
ELSE OPEN "O",2,COMMENTS.FILE$
CLOSE 2
10550 GOTO 20095
10553 Z$ = "time limit exceeded!"
SUBROUTINE.PARAMETER = 1
CALL UPDTCALR
IF LIMIT.DAILY.TIME THEN _
A$ = "Daily time limit exceeded! Please try tomorrow" _
ELSE A$ = "Session time limit exceeded."
GOSUB 1397
10555 IF KG THEN _
RETURN
'
' *****************************************************************************
' * G - COMMAND FROM MAIN MENU (GOODBYE) *
' * G - COMMAND FROM FILES MENU (GOODBYE) *
' *****************************************************************************
'
10560 GOSUB 9100
A$ = FIRST.NAME$ + ", Thanks for calling and please call again!"
GOSUB 12979
IF BPS = -1 THEN _
SUBROUTINE.PARAMETER = 1 : _
CALL DELAYIT
Z$ = "Logged off"
SUBROUTINE.PARAMETER = 1
CALL UPDTCALR
GOTO 10595
10590 Z$ = "Sleep Disconnect "
SUBROUTINE.PARAMETER = 1
CALL UPDTCALR
10595 GOSUB 9140
GOSUB 13700
IF SYSOP OR LOCAL.USER THEN _
GOSUB 5700
IF USER.FILE.INDEX < 1 THEN _
CLS : _
GOTO 13540
IF CONFERENCE.MODE AND (ACTIVE.USER.FILE$ <> MAIN.USER.FILE$) THEN _
GOSUB 12989 : _
GOSUB 9400 : _
GET 2,TIX : _
GOSUB 9600 : _
PUT 2,TIX : _
GOSUB 12991
10598 IF CONFERENCE.MODE THEN _
ACTIVE.MESSAGE.FILE$ = MAIN.MESSAGE.FILE$ : _
ACTIVE.USER.FILE$ = MAIN.USER.FILE$ : _
USER.FILE.INDEX = MAIN.USER.FILE.INDEX : _
GOSUB 9400 : _
GET 2,USER.FILE.INDEX : _
GOSUB 9500
10600 SYSOP = FALSE
GOSUB 12989
GOSUB 9400
10601 GET 2,USER.FILE.INDEX
GOSUB 9600
IF LIST.DIRECTORY THEN _
LSET LIST.NEW.DATE$ = CHR$(VAL(MID$(CURRENT.DATE$,7,2)))+_
CHR$(VAL(MID$(CURRENT.DATE$,1,2)))+_
CHR$(VAL(MID$(CURRENT.DATE$,4,2)))
10605 LSET USER.DOWNLOADS$ = MKI$(DOWNLOADS)
LSET USER.UPLOADS$ = MKI$(UPLOADS)
GOSUB 41010
LSET ELAPSED.TIME$ = MKI$(ELAPSED.TIME + _
(SECONDS.PER.SESSION! / 60) - _
TIME.REMAINING!)
PUT 2,USER.FILE.INDEX
GOTO 13540
10620 Z$ = LG$(LOGON.ERROR.INDEX)
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
Z$ = ACTIVE.USER.NAME$ + _
" on at " + _
CURRENT.DATE$ + _
", " + _
TIM$ + _
"** LOGON DENIED **, " + _
BAUD.PARITY$
NG$ = Z$ + SPACE$(128-LEN(Z$))
10698 A$ = "Access denied!"
GOSUB 12976
IF BPS = -1 THEN _
SUBROUTINE.PARAMETER = 1 : _
CALL DELAYIT
GOTO 13540
'
' *****************************************************************************
' * SCAN FILE DIRECTORIES FOR DIRECTORY FILENAMES *
' *****************************************************************************
'
10720 CLS
10721 FILES B$(J)
X = CSRLIN
LOCATE 2,1,1
MAIN.DIRECTORY$ = DIRECTORY.EXTENTION$
FOR I = 2 TO X
FOR B = 1 TO 66 STEP 18
G = G + 1
B$(G) = ""
FOR QQ = 0 TO 7
H = SCREEN (I,(B + QQ))
B$(G) = B$(G) + CHR$(H)
NEXT
IF LEFT$(B$(G),1) = " " THEN _
G = G-1 : _
RETURN
WHILE RIGHT$(B$(G),1) = " "
B$(G) = LEFT$(B$(G),LEN(B$(G))-1)
WEND
10733 IF LIST.NEW THEN _
IF (OMIT.MAIN.DIRECTORY$ = "YES" AND B$(G) = MAIN.DIRECTORY$) OR _
(OMIT.UPLOAD.DIRECTORY$ = "YES" AND B$(G) = UPLOAD.DIR.CHECK$) THEN _
G = G-1 : _
GOTO 10840
10840 NEXT
NEXT
RETURN
'
' *****************************************************************************
' * M - COMMAND FROM UTILITY MENU (CHANGE MARGINS) *
' *****************************************************************************
'
10925 UTILITY.MARGIN.CHANGE = TRUE
GOSUB 3100
UTILITY.MARGIN.CHANGE = FALSE
RETURN
'
' *****************************************************************************
' * 7 - COMMAND FROM SYSOP MENU (EXIT TO DOS) *
' *****************************************************************************
'
10930 IF DOS.VERSION < 2 OR REQUIRED.RINGS = 0 THEN _
A$ = "Remote exit to DOS not available." : _
GOTO 1200
10932 IF LOCAL.USER THEN _
A$ = "Only for remote SYSOP's" : _
GOTO 1200
10934 CLOSE 2
OPEN "O",2,RCTTY.BAT$
PRINT #2,"ECHO OFF"
PRINT #2,"CTTY ";COM.PORT$
PRINT #2,"ECHO RBBS-PC ";VERSION.ID$
PRINT #2,"ECHO SYSOP in Remote Console Mode at "; TIME$ ;" on "; DATE$
PRINT #2,DISK.FOR.DOS$;"COMMAND "
PRINT #2,"CTTY CON"
PRINT #2,RBBS.BAT$
10950 SUBROUTINE.PARAMETER = 1
CALL AMORPM
Z$ = "Exited to DOS at " + TIM$
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
GOTO 10992
'
' *****************************************************************************
' * D - COMMAND FROM MAIN MENU (EXIT TO DOORS) *
' *****************************************************************************
'
10970 IF NOT DOORS.AVAILABLE OR REQUIRED.RINGS = 0 THEN _
A$ = "All doors are locked!" : _
GOSUB 12979 : _
GOTO 20095
10973 FILE.NAME$ = MENU$(5)
GOSUB 43025
IF USER.SECURITY.LEVEL < DOORS.SECURITY.LEVEL THEN _
A$ = "You do not have a key for my doors!" : _
GOSUB 12979 : _
RETURN
10974 A$ = "Open which door (Press [ENTER] to quit)"
GOSUB 12995
IF Q = 0 THEN _
RETURN
CALL ALLCAPS (B$(1))
Z$ = B$(1)
10976 CALL OPENWORK
10978 IF EOF(2) THEN _
A$ = "No such door " + Z$ : _
GOSUB 12979 : _
GOTO 1200
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
10982 LINE INPUT #2,A$
IF LEN(A$) < LEN(Z$) THEN _
GOTO 10978
IF INSTR(A$,Z$) = 0 THEN _
GOTO 10978
Z$ = Z$ + ".BAT"
10986 FILE.NAME$ = Z$
CALL FINDIT
IF OK THEN _
GOTO 10987
A$ = "Door " + Z$ + " closed" + ". Please tell SYSOP"
GOSUB 12979
GOTO 10970
10987 CLOSE 2
OPEN "O",2,RCTTY.BAT$
PRINT #2,Z$
PRINT #2,RBBS.BAT$
CLOSE 2
A$ = Z$ + " door opened at " + TIME$ + " on " + DATE$
GOSUB 12979
EXIT.TO.DOORS = TRUE
Z$ = LEFT$(Z$,LEN(Z$)-4) + " door opened!"
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
10992 CLOSE 3
OUT MODEM.CONTROL.REGISTER,INP(MODEM.CONTROL.REGISTER) OR 1
IF EXIT.TO.DOORS THEN _
IF MULTI.LINK.PRESENT AND _
DOORS.TERMINAL.TYPE = > 1 THEN _
DEF SEG = MULTI.LINK.PRESENT : _
GOSUB 60500 : _
POKE (&H64 + PEEK(&H58) + 256*PEEK(&H59) + &HC),ASC(RIGHT$(COM.PORT$,1))-48 : _
AX = &H700 + DOORS.TERMINAL.TYPE : _
GOSUB 60510 : _
AX = &HB01 : _
BX = 0 : _
GOSUB 60510
10996 GOSUB 9140
GOSUB 43050
RUN "EXITRBBS.EXE"
'
' *****************************************************************************
' * 5 - COMMAND FROM SYSOP MENU (USER FILE MAINTENANCE) *
' *****************************************************************************
'
11000 TU = USER.FILE.INDEX
STOP.INTERRUPTS = TRUE
I = 1
SCAN.USERS = FALSE
A$ = "A)dd, L)st, P)rt, M)od, S)can users (Press [ENTER] to quit)"
GOSUB 12995
11003 IF Q = 0 THEN _
GOTO 20093
QQ = 0
Z$ = LEFT$(B$(1),1)
CALL ALLCAPS (Z$)
IF Z$ = "A" THEN _
GOTO 12300 _
ELSE IF Z$ = "M" THEN _
STOP.INTERRUPTS = FALSE _
ELSE IF Z$ = "P" THEN _
QQ = TRUE _
ELSE IF Z$ = "S" THEN _
SCAN.USERS = TRUE : _
STOP.INTERRUPTS = FALSE _
ELSE IF Z$ <> "L" THEN _
GOTO 11000
11005 GOSUB 9400
Z = 1
IF SCAN.USERS THEN _
A$ = "Scan for N)ame, P)wd, C)ity/St, S)ystem or L)evel" : _
GOSUB 12995 : _
SCAN.FUNCTION$ = LEFT$(B$(1),1) : _
CALL ALLCAPS (SCAN.FUNCTION$) : _
CR = 0 : _
GOSUB 12979 : _
GOSUB 12966 : _
GOTO 12962
11010 FOR J = Z TO HIGHEST.USER.RECORD-1
GET 2,J
11015 IF ASC(USER.NAME$) = 0 OR LEFT$(USER.NAME$,3) = " " THEN _
GOTO 11300
OF = CVI(SECURITY.LEVEL$)
A$ = RIGHT$(" "+STR$(LOC(2)),4) + _
":" + _
USER.NAME$ + _
"SECURITY" + _
RIGHT$(" "+STR$(OF),5) + _
" "
11020 A$ = A$ + _
"Password = " + _
PASSWORD$
11025 IF QQ THEN _
Z$ = A$ : _
CALL PRINTIT
11027 GOSUB 12979
RH = RET
IF OF < MINIMUM.LOGON.SECURITY THEN _
A$ = " <Locked out> " : _
GOTO 11030
IF OF >= SYSOP.SECURITY.LEVEL THEN _
A$ = " (SYSOP) " : _
GOTO 11030
A$ = SPACE$(19)
11030 A$ = A$ + _
LAST.DATE.TIME.ON$ + _
" " + _
CITY.STATE$ + _
MACHINE.TYPE$
11100 IF QQ THEN _
Z$ = A$ : _
CALL PRINTIT
11101 GOSUB 12979
RH = RET
A$ = " DOWNLOADS = " + _
RIGHT$(" "+STR$(CVI(USER.DOWNLOADS$)),5)
A$ = A$ + SPACE$(22-LEN(A$)) + _
"UPLOADS = " + _
RIGHT$(" "+STR$(CVI(USER.UPLOADS$)),5)
A$ = A$ + SPACE$(40-LEN(A$)) + _
" Times on =" + _
RIGHT$(" "+STR$(CVI(MID$(USER.OPTIONS$,1,2))),5)
A$ = A$ + SPACE$(59-LEN(A$)) + _
"TIME USED = " + _
RIGHT$(" "+STR$(CVI(ELAPSED.TIME$)),5) + _
" Min"
IF QQ THEN _
Z$ = A$ : _
CALL PRINTIT
11105 GOSUB 12979
IF STOP.INTERRUPTS THEN _
GOTO 11300
11110 A$ = "D)elete, F)ind, M)enu, N)ew pwd, P)rint,"
GOSUB 12979
A$ = "R)eset graphics, Q)uit, S)ecurity, #)user"
GOSUB 12995
IF NOT SCAN.USERS AND Q = 0 THEN _
GOTO 11310
11115 Z$ = LEFT$(B$(1),1)
CALL ALLCAPS (Z$)
X = INSTR("DNPQFSMR",Z$)
IF Z$ = "" AND SCAN.USERS THEN _
GOTO 12965
ON X GOTO 11130,11160,11220,11320,11340,11390,11330,11400
11125 Z = VAL(B$)
IF Z < 1 OR Z > HIGHEST.USER.RECORD-1 THEN _
GOTO 11310 _
ELSE GOTO 11010
'
' *****************************************************************************
' * D - COMMAND FROM 5- USER MAINTENANCE OPTIONS (DELETE USER) *
' *****************************************************************************
'
11130 A$ = "Delete user (Y/N)"
SUBROUTINE.PARAMETER = 1
CALL TGET
IF NO THEN _
GOTO 11290
LSET USER.NAME$ = "deleted user"
LSET SECURITY.LEVEL$ = MKI$(MINIMUM.LOGON.SECURITY -1)
LSET LAST.DATE.TIME.ON$ = "01/01/80" + " " + TIME.LOGGED.ON$
GOTO 11290
'
' *****************************************************************************
' * N - COMMAND FROM 5- USER MAINTENANCE OPTIONS (CHANGE USER PASSWORD) *
' *****************************************************************************
'
11160 GOSUB 12800
GOTO 11290
'
' *****************************************************************************
' * P - COMMAND FROM 5- USER MAINTENANCE OPTIONS (PRINT USER FILE) *
' *****************************************************************************
'
11220 QQ = NOT QQ
GOTO 11015
11290 USER.FILE.INDEX = LOC(2)
GOSUB 12989
PUT 2,USER.FILE.INDEX
GOSUB 12991
USER.FILE.INDEX = 0
GOTO 11015
11300 IF RH THEN _
GOTO 11330
11310 IF SCAN.USERS THEN _
GOTO 12965
11311 NEXT
'
' *****************************************************************************
' * Q - COMMAND FROM 5- USER MAINTENANCE OPTIONS (QUIT TO MAIN MENU) *
' *****************************************************************************
'
11320 CLOSE 2
USER.FILE.INDEX = TU
GOTO 20095
'
' *****************************************************************************
' * M - COMMAND FROM 5- USER MAINTENANCE OPTIONS (MAIN USER MAINT. MENU) *
' *****************************************************************************
'
11330 CLOSE 2
GOTO 11000
'
' *****************************************************************************
' * F - COMMAND FROM 5- USER MAINTENANCE OPTIONS (FIND USER) *
' *****************************************************************************
'
11340 A$ = "Full name to find"
CALL SKIPLINE
GOSUB 12995
IF Q = 0 THEN _
GOTO 11340
CALL ALLCAPS (B$(1))
TEMP.USER.NAME$ = B$(1)
IF LEN(TEMP.USER.NAME$) < 6 THEN _
GOTO 11340
GOSUB 12600
GOSUB 12984
USER.FILE.INDEX = 0
IF FOUND THEN _
GOTO 11015
11380 A$ = TEMP.USER.NAME$ + " not found"
GOSUB 12977
GOTO 11310
'
' *****************************************************************************
' * S - COMMAND FROM 5- USER MAINTENANCE OPTIONS (CHANGE USER SECURITY) *
' *****************************************************************************
'
11390 GOSUB 11395
LSET SECURITY.LEVEL$ = MKI$(OF)
GOTO 11290
11395 A$ = "Enter security level"
GOSUB 12995
CALL ALLCAPS (B$(1))
Z$ = B$(1)
OF = VAL(Z$)
IF OF > USER.SECURITY.LEVEL THEN _
OF = USER.SECURITY.LEVEL
RETURN
'
' *****************************************************************************
' * R - COMMAND FROM 5- USER MAINTENANCE OPTIONS (RESET USER GRAPHICS) *
' *****************************************************************************
'
11400 LSET USER.OPTIONS$ = LEFT$(USER.OPTIONS$,5) + _
"0" + _
MID$(USER.OPTIONS$,7)
GOTO 11290
'
' *****************************************************************************
' * A - COMMAND FROM 5- USER MAINTENANCE OPTIONS (ADD USER) *
' *****************************************************************************
'
12300 A1$ = ""
ATTEMPTS = 0
USER.SECURITY.LEVEL.SAVE = USER.SECURITY.LEVEL
FIRST.NAME.SAVE$ = FIRST.NAME$
LAST.NAME.SAVE$ = LAST.NAME$
ACTIVE.USER.NAME.SAVE$ = ACTIVE.USER.NAME$
CITY.STATE.SAVE$ = CI$
GOSUB 12500
TEMP.USER.NAME$ = ACTIVE.USER.NAME$
GOSUB 12600
IF USER.FILE.INDEX = 0 THEN _
GOSUB 12984 : _
GOTO 12330
IF FOUND THEN _
PRINT "User already exists" : _
GOSUB 12984 : _
GOTO 12330
12310 GOSUB 12630
GOSUB 12800
GOSUB 11395
TEMP.SECURITY.LEVEL = OF
GOSUB 12900
LSET LAST.DATE.TIME.ON$ = CURRENT.DATE$ + _
" " + _
TIME.LOGGED.ON$
GOSUB 12950
CALL ALLCAPS (B$(1))
LSET CITY.STATE$ = B$(1)
LSET ELAPSED.TIME$ = MKI$(0)
PUT 2,USER.FILE.INDEX
12320 GOSUB 12991
12330 USER.SECURITY.LEVEL = USER.SECURITY.LEVEL.SAVE
FIRST.NAME$ = FIRST.NAME.SAVE$
LAST.NAME$ = LAST.NAME.SAVE$
ACTIVE.USER.NAME$ = ACTIVE.USER.NAME.SAVE$
CI$ = CITY.STATE.SAVE$
USER.FILE.INDEX = TU
GOTO 11000
'
' *****************************************************************************
' * GET USER FIRST AND LAST NAMES *
' *****************************************************************************
'
12500 IF ATTEMPTS > 5 THEN _
FF = TRUE : _
RETURN
12510 GOSUB 12700
ATTEMPTS = ATTEMPTS + 1
A$ = A1$ + "FIRST Name"
CALL SKIPLINE
GOSUB 12995
IF Q = 0 THEN _
GOTO 12500
CALL ALLCAPS (B$(1))
Z$ = B$(1)
GOSUB 5100
FIRST.NAME$ = LEFT$(Z$ + SPACE$(2),INSTR(Z$ +SPACE$(2),SPACE$(2))-1)
IF Q = 1 THEN _
GOTO 12530
12520 CALL ALLCAPS (B$(2))
Z$ = B$(2)
GOTO 12540
12530 A$ = A1$ + "LAST Name"
GOSUB 12995
CALL ALLCAPS (B$(1))
Z$ = B$(1)
12540 GOSUB 5100
LAST.NAME$ =LEFT$(Z$ + SPACE$(2),INSTR(Z$ +SPACE$(2),SPACE$(2))-1)
IF LEN(FIRST.NAME$) < 2 OR _
LEN(LAST.NAME$) < 2 OR _
(LEN(FIRST.NAME$) + LEN(LAST.NAME$)) > 30 THEN _
GOTO 12500
12550 ACTIVE.USER.NAME$ = MID$(FIRST.NAME$ + " " + LAST.NAME$,1,31)
Z$ = FIRST.NAME$
RETURN
'
' *****************************************************************************
' * CHECK FOR NAMES NOT ALLOWED *
' *****************************************************************************
'
12570 FOUND = FALSE
SWAP TRASHCAN.FILE$,FILE.NAME$
CALL OPENWORK
SWAP TRASHCAN.FILE$,FILE.NAME$
IF EC = 53 THEN _
GOTO 710
12580 IF EOF(2) THEN _
RETURN
INPUT #2,INVALID.NAME$
IF Z$ <> INVALID.NAME$ THEN _
GOTO 12580
FOUND = TRUE
RETURN
12595 A$ = "Real name required. Call traced & recorded."
GOSUB 12979
GOTO 10698
'
' *****************************************************************************
' * COMMON SEARCH USER FILE ROUTINE *
' *****************************************************************************
'
12600 GOSUB 4910
GOSUB 12988
A$ = "Checking Users..."
GOSUB 12977
12605 GOSUB 9400
X$ = TEMP.USER.NAME$ + SPACE$(31-LEN(TEMP.USER.NAME$))
DF = (ASC(MID$(TEMP.USER.NAME$,2,1))*10 + 7) MOD _
HIGHEST.USER.RECORD
USER.FILE.INDEX = _
((ASC(TEMP.USER.NAME$)*100 + _
ASC(MID$(TEMP.USER.NAME$,LEN(TEMP.USER.NAME$) / 2,1)) * _
10 + _
ASC(RIGHT$(TEMP.USER.NAME$,1))) _
MOD HIGHEST.USER.RECORD) + 1
IX = 0
12610 GET 2,USER.FILE.INDEX
IF X$ = USER.NAME$ THEN _
FOUND = TRUE : _
RETURN
IF USER.NAME$ = SPACE$(31) THEN _
IF CURRENT.USER.COUNT >= HIGHEST.USER.RECORD*.95 THEN _
Z$ = "No room for new users" + GRN$ : _
A$ = Z$ : _
SUBROUTINE.PARAMETER = 2 : _
CALL UPDTCALR : _
GOSUB 1397 : _
USER.FILE.INDEX = 0 : _
FOUND = FALSE : _
RETURN _
ELSE USER.FILE.INDEX = IX-(IX = 0)*USER.FILE.INDEX : _
FOUND = FALSE : _
RETURN
IF ASC(USER.NAME$) = 0 OR LEFT$(USER.NAME$,7) = "NEWUSER" THEN _
IF IX = 0 THEN _
IX = USER.FILE.INDEX
12620 USER.FILE.INDEX = USER.FILE.INDEX + DF
IF USER.FILE.INDEX > HIGHEST.USER.RECORD-1 THEN _
USER.FILE.INDEX = USER.FILE.INDEX-HIGHEST.USER.RECORD
GOTO 12610
12630 GOSUB 23000
CURRENT.USER.COUNT = CURRENT.USER.COUNT-(IX = 0)
GOSUB 24000
GOSUB 12987
GOSUB 12989
GOSUB 12990
RETURN
'
' *****************************************************************************
' * INFORM USER OF WHAT CONFERENCE USER FILE HE IS VIEWING *
' *****************************************************************************
'
12700 IF CONFERENCE.MODE THEN _
A$ = "Users of " + GRN$ + ":" : _
GOSUB 12979
RETURN
'
' *****************************************************************************
' * GET PASSWORD FROM NEWUSER *
' *****************************************************************************
'
12800 A$ = "Enter PASSWORD you'll use to logon again"
GOSUB 12995
IF B$(1) = SPACE$(LEN(B$(1))) THEN _
GOTO 12800
IF LEN(B$(1)) > 15 THEN _
A$ = "15 Char. Max" : _
GOSUB 12979 : _
GOTO 12800
CALL ALLCAPS (B$(1))
Z$ = B$(1)
LSET PASSWORD$ = Z$
RETURN
'
' *****************************************************************************
' * SET NEWUSER DEFAULTS *
' *****************************************************************************
'
12900 LSET USER.NAME$ = ACTIVE.USER.NAME$
LSET USER.OPTIONS$ = MKI$(0) + _
MKI$(0) + _
" 0" + _
MKI$(64) + _
MKI$(16) + _
MKI$(0) + _
CHR$(PAGE.LENGTH) + _
STRING$(1,0)
LSET USER.DOWNLOADS$ = MKI$(0)
LSET USER.UPLOADS$ = MKI$(0)
LSET SECURITY.LEVEL$ = MKI$(TEMP.SECURITY.LEVEL)
LSET ELAPSED.TIME$ = MKI$(0)
RETURN
'
' *****************************************************************************
' * GET MACHINE TYPE CALLING FROM *
' *****************************************************************************
'
12950 A$ = "What type of system are you calling from (Press [ENTER] if " + _
DEFAULT.MACHINE.TYPE$ + _
")"
GOSUB 12995
IF Q = 0 THEN _
LSET MACHINE.TYPE$ = DEFAULT.MACHINE.TYPE$ _
ELSE CALL ALLCAPS (B$(1)) : _
LSET MACHINE.TYPE$ = B$(1)
'
' *****************************************************************************
' * GET CITY AND STATE FROM NEWUSER *
' *****************************************************************************
'
12960 A$ = A1$ + "CITY and STATE"
GOSUB 12995
IF Q = 0 THEN _
GOTO 12960
CALL ALLCAPS (B$(1))
LSET CITY.STATE$ = B$(1)
CI$ = B$(1) + SPACE$(2)
RETURN
'
' *****************************************************************************
' * S - COMMAND FROM 5 - USER MAINTENANCE OPTIONS (SCAN USERS) *
' *****************************************************************************
'
12962 X = 0
FF = FALSE
A$ = "String to search (Press [ENTER] to quit)"
GOSUB 12995
IF Q = 0 THEN _
GOTO 11000
CALL ALLCAPS (B$(1))
R$ = B$(1)
12963 GET 2,I
GOSUB 12966
X = INSTR(SCAN.FIELD$,R$)
IF X > 0 THEN _
GOTO 11015
12965 I = I + 1
IF I > HIGHEST.USER.RECORD-1 THEN _
GOTO 11000
X = 0
GOTO 12963
12966 FF = INSTR("NCPSL",SCAN.FUNCTION$)
IF FF = 0 THEN _
GOTO 11000
12967 ON FF GOTO 12968,12969,12970,12971,12972
'
' *****************************************************************************
' * N - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (SEARCH FOR NAME) *
' *****************************************************************************
'
12968 SCAN.FIELD$ = USER.NAME$
RETURN
'
' *****************************************************************************
' * C - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (SEARCH FOR CITY/ST) *
' *****************************************************************************
'
12969 SCAN.FIELD$ = CITY.STATE$
RETURN
'
' *****************************************************************************
' * P - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (SEARCH FOR PASSWORD)*
' *****************************************************************************
'
12970 SCAN.FIELD$ = PASSWORD$
RETURN
'
' *****************************************************************************
' * S - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (SEARCH FOR SYSTEM) *
' *****************************************************************************
'
12971 SCAN.FIELD$ = MACHINE.TYPE$
RETURN
'
' *****************************************************************************
' * L - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (SEARCH FOR LEVEL) *
' *****************************************************************************
'
12972 SCAN.FIELD$ = STR$(CVI(SECURITY.LEVEL$))
RETURN
'
' *****************************************************************************
' * CALLS INTO SEPEARATELY COMPILED SUBROUTINES (RBBS-SUB) *
' *****************************************************************************
'
'
' *****************************************************************************
' * STANDARD ENTRY FOR RBBS-PC'S COMMON TERMINAL OUTPUT ROUTINE *
' *****************************************************************************
'
12975 SUBROUTINE.PARAMETER = 1
GOTO 12981
12976 SUBROUTINE.PARAMETER = 2
GOTO 12981
12977 SUBROUTINE.PARAMETER = 3
GOTO 12981
12978 SUBROUTINE.PARAMETER = 4
GOTO 12981
12979 SUBROUTINE.PARAMETER = 5
GOTO 12981
12980 SUBROUTINE.PARAMETER = 6
12981 CALL TPUT
12983 IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
IF FUNCTION.KEY <>0 THEN _
GOSUB 60010 : _
SUBROUTINE.PARAMETER = 7 : _
FUNCTION.KEY = 0 : _
GOTO 12981
IF SUBROUTINE.PARAMETER = 8 THEN _
GOSUB 12995
RETURN
'
' *****************************************************************************
' * STANDARD ENTRY FOR RBBS-PC'S FILE LOCKING WHEN RUNNING MULTIPLE RBBS-PC'S *
' *****************************************************************************
'
12984 SUBROUTINE.PARAMETER = 1
GOTO 12994
12985 SUBROUTINE.PARAMETER = 2
GOTO 12994
12986 SUBROUTINE.PARAMETER = 3
GOTO 12994
12987 SUBROUTINE.PARAMETER = 4
GOTO 12994
12988 SUBROUTINE.PARAMETER = 5
GOTO 12994
12989 SUBROUTINE.PARAMETER = 6
GOTO 12994
12990 SUBROUTINE.PARAMETER = 7
GOTO 12994
12991 SUBROUTINE.PARAMETER = 8
GOTO 12994
12992 SUBROUTINE.PARAMETER = 9
GOTO 12994
12993 SUBROUTINE.PARAMETER = 10
12994 CALL FILELOCK
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 31000
RETURN
'
' *****************************************************************************
' * STANDARD ENTRY FOR RBBS-PC'S COMMON TERMINAL INPUT ROUTINE *
' *****************************************************************************
'
12995 SUBROUTINE.PARAMETER = 1
12996 CALL TGET
12997 IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
IF FUNCTION.KEY <>0 THEN _
GOSUB 60010 : _
SUBROUTINE.PARAMETER = 2 : _
FUNCTION.KEY = 0 : _
GOTO 12996
RETURN
'
' *****************************************************************************
' * MAIN SYSTEM ERROR TRAP - ALL ERRORS PASS THROUGH THIS ROUTINE *
' *****************************************************************************
'
13000 ' PRINT ERR,ERL
IF ERR = 0 AND ERL = 210 THEN _
PRINT "Unrecoverable error on communications port" : _
GOTO 31000
IF ERR = 0 THEN _
GOTO 13540
IF ERR = 7 THEN _
GOTO 13650
13010 IF ERL = 130 THEN _
CALLERS.FILE.INDEX = 1 : _
RESUME 135
13025 IF ERL = 677 AND ERR = 5 THEN _
RESUME 670
13033 IF ERL = 825 AND ERR = 5 THEN _
RESUME 830
13038 IF ERL = 4371 AND ERR = 6 THEN _
RESUME 1200
13045 IF ERL = 5130 AND ERR = 63 THEN _
RESUME 5160
13047 IF ERL = 5151 AND ERR = 62 THEN _
RESUME 5160
13050 IF ERL = 9400 AND ERR = 75 AND SHARE.IT THEN _
SUBROUTINE.PARAMETER = 30 : _
CALL DELAYIT : _
RESUME 9400
13060 IF ERL = 11025 THEN _
QQ = 0 : _
RESUME 11025
13070 IF ERL = 11100 THEN _
QQ = 0 : _
RESUME 11100
13075 IF ERL = 12610 AND ERR = 63 THEN _
IF IX = 0 THEN _
IX = USER.FILE.INDEX : _
RESUME 12620 _
ELSE RESUME 12620
13087 IF ERL = 20242 AND ERR = 62 THEN _
RESUME 20247
13090 IF ERR = 58 THEN _
GOTO 13190
13100 CALL FINDTIME (TI!)
IF (ERR = EC AND (TI! - TKA! < 5)) THEN _
EA = EA + 1 : _
IF EA > 10 THEN _
GOTO 13800
13120 EC = ERR
CALL FINDTIME (TI!)
IF TI! - TKA! > 5 THEN _
EA = 0 _
ELSE CALL FINDTIME(TKA!)
13190 IF ERL = 3737 OR _
ERL = 4797 OR _
ERL = 20840 OR _
ERL = 21281 OR _
ERL = 21360 OR _
ERL = 21420 THEN _
SUBROUTINE.PARAMETER = 1 : _
CALL DELAYIT : _
IF INP(MODEM.STATUS.REGISTER) < 128 THEN _
RESUME 10595
13220 IF ERL = 3737 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 3737
13225 IF ERL = 4740 THEN _
RESUME 4745
13230 IF ERL = 4797 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 4797
13245 IF ERL = 5536 AND ERR = 57 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 5530
13250 IF ERL = 5536 THEN _
RESUME 5530
13260 IF ERL = 7110 THEN _
RESUME 6080
13270 IF ERL = 7130 AND ERR = 52 THEN _
RESUME 7260
13280 IF ERL = 10601 AND ERR = 63 THEN _
GOTO 10595
13310 IF ERL = 10721 THEN _
IF ERR = 53 OR ERR = 64 OR ERR = 68 THEN _
RESUME 5160
IF ERL = 20290 AND ERR = 75 THEN _
RESUME 20231
13390 IF ERL = 20452 AND ERR = 53 THEN _
RESUME 20451
IF ERL = 20560 AND ERR = 67 THEN _
RESUME 20451
13395 IF ERL = 20560 AND ERR = 70 THEN _
IF VAL(FREE.SPACE$) > 1999 THEN _
RESUME 20451 ELSE _
A$ = "No room for uploads! Please try again tomorrow." : _
GOSUB 12979 : _
RESUME 5160
13396 IF ERL = 20610 AND ERR = 57 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 20610
13400 IF ERL = 20620 THEN _
RESUME 20670
13405 IF ERL = 20736 AND ERR = 53 THEN _
RESUME 5160
13410 IF ERL = 20840 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 20840
13415 IF ERL = 20900 AND ERR = 70 THEN _
A$ = "No room for uploads! Please try again tomorrow." : _
GOSUB 12979 : _
RESUME 21230
IF ERL = 20900 AND ERR = 75 THEN _
RESUME 21230
13420 IF ERL = 21131 THEN _
RESUME 21230
13430 IF ERL = 21281 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 21281
13440 IF ERL = 21360 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 21360
13442 IF ERL = 21420 THEN _
LINE.STATUS = INP(LINE.STATUS.REGISTER) : _
RESUME 21420
13450 IF 65535! = ERL THEN _
GOTO 13800
13460 IF ERR = 5 OR ERR = 6 THEN _
GOTO 10595
13470 IF ERR = 57 OR ERR = 24 OR ERR = 25 THEN _
SUBROUTINE.PARAMETER = 1 : _
CALL DELAYIT : _
IF INP(MODEM.STATUS.REGISTER) < 128 THEN _
RESUME 10595
13480 IF ERR = 61 OR EC = 61 THEN _
A$ = "* Disk full - terminating *" : _
GOSUB 12976 : _
GOSUB 33090 : _
IF (ERR = 61 OR EC = 61) AND ERL <> 43050 THEN _
CALL LOGERROR : _
RESUME 13540 : _
ELSE RESUME 13540
13490 IF ERR = 71 THEN _
GOSUB 13630 : _
RESUME 20015
13500 CALL LOGERROR
A$ = A$ + ". Please tell SYSOP"
IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
GOSUB 12979
RESUME 1200
'
' *****************************************************************************
' * COMMON EXIT FROM RBBS-PC (I.E. "ABANDON ALL HOPE OH YE WHO ENTER HERE") *
' *****************************************************************************
'
13540 IF LOCAL.USER THEN _
GOTO 13549
13543 IF NOT SYSOP THEN _
IF USER.FILE.INDEX = 0 OR NEW.USER = TRUE THEN _
GOTO 13549
13545 GOSUB 43050
13549 GOSUB 13700
GOSUB 13550
GOSUB 12986
GOSUB 30500
GET 1,NODE.RECORD.INDEX
EXIT.TO.DOORS = FALSE
MID$(MESSAGE.RECORD$,57,1) = "I"
MID$(MESSAGE.RECORD$,40,2) = STR$(EXIT.TO.DOORS)
PUT 1,NODE.RECORD.INDEX
GOSUB 12985
CLOSE
SUBROUTINE.PARAMETER = 4
CALL DELAYIT
IF RECYCLE.TO.DOS THEN _
GOTO 31000 _
ELSE RUN 100
13550 IF LOCAL.USER THEN _
RETURN
13560 SUBROUTINE.PARAMETER = 3
CALL DELAYIT
OUT MODEM.CONTROL.REGISTER,INP(MODEM.CONTROL.REGISTER) AND 254
SUBROUTINE.PARAMETER = 1
CALL DELAYIT
OUT MODEM.CONTROL.REGISTER,INP(MODEM.CONTROL.REGISTER) OR 1
RETURN
13600 CLS
LOCATE ,,0
PRINT DF$;" file not found/invalid. Run CONFIG."
SUBROUTINE.PARAMETER = 3
CALL DELAYIT
GOTO 31000
13630 A$ = "File Menu not available."
GOSUB 12979
RETURN
13650 CLS
LOCATE ,,0
PRINT "Not enough memory for RBBS"
SUBROUTINE.PARAMETER = 3
CALL DELAYIT
GOTO 31000
13700 IF MESSAGE.FILE.LOCK THEN _
GOSUB 12987
13710 IF USER.FILE.LOCK THEN _
GOSUB 12990
13720 IF USER.BLOCK.LOCK THEN _
GOSUB 12991
RETURN
'
' *****************************************************************************
' * FATAL ERROR HAS OCCURED! RECYCLE SYSTEM IMMEDIATELY *
' *****************************************************************************
'
13800 A$ = "Fatal error!"
GOSUB 12979
GOTO 10595
'
' *****************************************************************************
' * TAKE THE PHONE OFF THE HOOK FOR LOCAL SYSOP MAINTENANCE *
' *****************************************************************************
'
14500 A$ = MODEM.GO.OFFHOOK.COMMAND$
CALL MODEMPUT
CLOSE 3
RETURN
'
' *****************************************************************************
' * *
' * FILES MENU PROCESSING *
' * *
' *****************************************************************************
'
20015 SUBROUTINE.PARAMETER = 1
CALL LINE25
ACTIVE.MENU$ = "F"
GOSUB 41050
NON.STOP = FALSE
IF NOT EXPERT.USER THEN _
FILE.NAME$ = MENU$(3) : _
GOSUB 43025
20030 A$ = GRN$ + " File Function <D,G,H,L,N,Q,S,U,X,?>"
CALL SKIPLINE
GOSUB 12995
IF Q = 0 THEN _
GOTO 20015
20050 LIST.NEW = FALSE
CALL ALLCAPS (B$(1))
Z$ = B$(1)
FF = INSTR("DGHLNQSUX?",Z$)
IF FF = 0 THEN _
J = 1 : _
GOSUB 1360 : _
GOTO 20015
IF USER.SECURITY.LEVEL < FILES.FUNCTION(FF) THEN _
VIOLATION$ = "File " + Z$ : _
GOSUB 1380 : _
GOTO 20015
20070 ON FF GOSUB 20180, _ ' D)ownload a file
20100, _ ' G)oodbye (log off)
20110, _ ' H)elp (on line)
20150, _ ' L)ist file directories
53000, _ ' N)ew file search since given date
20090, _ ' Q)uit and exit to message subsystem
52900, _ ' S)earch directories for a string
20400, _ ' U)pload a file
4240, _ ' X)Expert mode toggle on/off
20130 ' ?)File transfer information
GOTO 20015
'
' *****************************************************************************
' * Q - COMMAND FROM FILES MENU (QUIT) *
' *****************************************************************************
'
20090 RETURN 20095
'
' *****************************************************************************
' * C/R - COMMAND FROM 5 - USER MAINTENANCE SCAN FUNCTION (QUIT TO MAIN MENU)*
' *****************************************************************************
'
20093 IF USER.FILE.INDEX > 0 THEN _
GOSUB 9400 : _
GET 2,USER.FILE.INDEX : _
GOSUB 9500
20095 RETURN 1200
'
' *****************************************************************************
' * G - COMMAND FROM FILES MENU (GOODBYE) *
' *****************************************************************************
'
20100 RETURN 10560
'
' *****************************************************************************
' * H - COMMAND FROM FILES MENU (HELP) *
' *****************************************************************************
'
20110 FILE.NAME$ = HELP$(5)
GOSUB 1790
RETURN
'
' *****************************************************************************
' * ? - COMMAND FROM FILES MENU (EXTRA HELP) *
' *****************************************************************************
'
20130 FILE.NAME$ = HELP$(6)
GOSUB 1790
RETURN
'
' *****************************************************************************
' * L - COMMAND FROM FILES MENU (LIST DIRECTORY) *
' *****************************************************************************
'
20150 LIST.DIRECTORY = TRUE
IF Q < 2 THEN _
Q = 2 : _
B$(Q) = DIRECTORY.EXTENTION$
20160 X = 2
QX = Q
20161 IF X > QX THEN _
RETURN
IF INSTR(B$(X),".") THEN _
GOTO 20172
VIOLATION$ = "List Dir. "
Z$ = B$(X)
CALL BADFILE
ON BAD.FILE.NAME.INDEX GOTO 20162,20172,20176
20162 FOR SUBDIR.INDEX = 1 TO SUBDIR.COUNT
FILE.NAME$ = B$(X)
CALL BADNAME
ON BAD.FILE.NAME.INDEX GOTO 20164,20176
20164 FILE.NAME$ = SUBDIR$(SUBDIR.INDEX)+ _
B$(X) + _
"." + _
DIRECTORY.EXTENTION$
GOSUB 43030
20165 CALL FINDIT
IF OK THEN _
GOTO 20167
GOTO 20170
20167 IF LIST.NEW THEN _
GOSUB 7000 : _
GOTO 20175
GOSUB 6000
GOTO 20175
20170 NEXT
20172 A$ = "Directory " + B$(X) + " not found!"
GOSUB 12977
20175 X = X + 1
GOTO 20161
20176 GOSUB 1380
GOTO 20172
'
' *****************************************************************************
' * D - COMMAND FROM FILES MENU (SEARCH FOR FILE TO DOWNLOAD) *
' *****************************************************************************
'
20180 IF Q > 1 THEN _
B = 2 : _
GOTO 20202
20200 A$ = "Enter full filename to download"
GOSUB 12995
B = 1
IF Q = 0 THEN _
RETURN
20202 START.DRIVE = 1
IF Q > B THEN _
START.DRIVE = VAL(B$(B + 1)) : _
IF START.DRIVE < 1 THEN _
START.DRIVE = 1
20205 Z$ = B$(B)
VIOLATION$ = "Download "
FOR SUBDIR.INDEX = START.DRIVE TO (SUBDIR.COUNT) + (NOT SYSOP)
CALL BADFILE
ON BAD.FILE.NAME.INDEX GOTO 20220,20231,20233
20220 CALL FINDIT
20225 IF OK THEN _
GOTO 20235
20230 NEXT
20231 Z$ = B$(B) + " not found!"
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
A$ = Z$ + " Type L for directory"
GOSUB 12977
RETURN 20015
20233 GOSUB 1380
GOTO 20231
20235 CALL BADNAME
ON BAD.FILE.NAME.INDEX GOTO 20236,20245
20236 LINE.25$ = "(D) " + Z$
'
' *****************************************************************************
' * TEST FOR DOWNLOAD SECURITY *
' *****************************************************************************
'
SWAP FILESEC.FILE$,FILE.NAME$
CALL OPENWORK
SWAP FILESEC.FILE$,FILE.NAME$
IF EC = 53 THEN _
Z$ = "Missing file " + FILESEC.FILE$ : _
SUBROUTINE.PARAMETER = 2 : _
CALL UPDTCALR : _
GOTO 20247
N$ = Z$
GOSUB 20282
LG$(9) = DR$
LG$(8) = X$
LG$(10) = EXTENTION$
20242 IF EOF(2) THEN _
GOTO 20247 _
ELSE INPUT #2,N$,FILE.SECURITY,FILE.PASSWORD$ : _
GOSUB 20282
20243 IF DR$ <> "" AND DR$ <> LG$(9) THEN _
GOTO 20242
A$ = LG$(8)
Z$ = X$
GOSUB 20285
IF OK THEN _
GOTO 20242
A$ = LG$(10)
Z$ = EXTENTION$
GOSUB 20285
IF OK THEN _
GOTO 20242
20244 IF USER.SECURITY.LEVEL < FILE.SECURITY THEN _
GOTO 20245
IF FILE.PASSWORD$ = "" THEN _
GOTO 20247
CALL ALLCAPS (FILE.PASSWORD$)
IF FILE.PASSWORD$ = PASSWORD$ THEN _
GOTO 20247
A$ = "Enter PASSWORD for downloading " + FILE.NAME$
GOSUB 12995
IF Q = 0 THEN _
RETURN 20015
CALL ALLCAPS (B$(1))
IF B$(1) = FILE.PASSWORD$ THEN _
GOTO 20247
20245 VIOLATION$ = "DownLoad " + FILE.NAME$
20246 GOSUB 1380
RETURN 20015
20247 DF = 0
N$ = FILE.NAME$
GOSUB 20282
IF INSTR(".WRK.FW .ARC.EXE.COM.OBJ.WKS.LBR",EXTENTION$) OR _
MID$(EXTENTION$,3,1) = "Q" OR _
(REQUIRE.NON.ASCII AND EXTENTION$ = ".BAS") THEN _
A$ = "Non-ASCII transfer required" : _
GOSUB 12979 : _
DF = TRUE
20248 T$ = "Download" + TRANSFER.OPTIONS$
GOSUB 21620
IF FF THEN _
GOTO 20260
GOSUB 21600
20260 HH = 1
ON FF GOTO 20340,20262,20290,20290,57120
'
' *****************************************************************************
' * TEST FOR MNP PROTOCAL AVAILABLE *
' *****************************************************************************
'
20262 IF NOT MNP.SUPPORT THEN _
A$ = "MNP unavailable" : _
GOSUB 12979 : _
ON HH GOTO 57120,57120
LL = HH*HH
LL = LL-HH
GOSUB 20264
ON LL + HH GOTO 20385,20266,20660,20730
STOP
'
' *****************************************************************************
' * MNP INTERFACE FOR DOWNLOADS & UPLOADS *
' *****************************************************************************
'
20264 A$ = "MNP not yet available with the new BASIC compilers"
GOSUB 12975
RETURN
' CLOSE 3
' OUT MODEM.CONTROL.REGISTER,INP(MODEM.CONTROL.REGISTER) OR 1
' CALL MNP(HH,FILE.NAME$,COM.PORT$,BPS)
' OPEN COM.PORT$ + _
' ":" + _
' MID$(" 300 4501200240048009600",(-4*BPS),4) + _
' "," + _
' MID$("N,8,1E,7,",6 + 5*EIGHT.BIT,4) + _
' "1,RS,CD,DS" AS 3
' RETURN
'
' *****************************************************************************
' * DOWNLOAD ABORT *
' *****************************************************************************
'
20266 A$ = "<Download aborted>"
DOWNLOAD.COMPLETED = FALSE
GOTO 20390
20282 CALL ALLCAPS (N$)
Z$ = N$
IF MID$(Z$,2,1) = ":" THEN _
DR$ = LEFT$(Z$,1) : _
S = 3 _
ELSE DR$ = "" : _
S = 1
20283 XXX = INSTR(Z$ + ".",".")
X$ = MID$(Z$,S,XXX-S)
EXTENTION$ = MID$(Z$,XXX + 1,3)
RETURN
20285 OK = FALSE
K = 0
L = LEN(A$)
20286 K = K + 1
IF K > L THEN _
GOTO 20288
B$ = MID$(Z$,K,1)
IF B$ = "*" THEN _
RETURN
20287 IF B$ <> "?" AND MID$(A$,K,1) <> B$ THEN _
OK = TRUE : _
RETURN
GOTO 20286
20288 IF L < LEN(Z$) AND MID$(Z$,L + 1,1) <> "*" THEN _
OK = TRUE
RETURN
'
' *****************************************************************************
' * XMODEM DOWNLOAD DRIVER *
' *****************************************************************************
'
20290 CLOSE 2
IF SHARE.IT THEN _
OPEN FILE.NAME$ FOR RANDOM SHARED AS #2 LEN=128 _
ELSE OPEN "R",2,FILE.NAME$,128
TLA = 165
GOSUB 20750
A1$ = "SEND"
GOSUB 20320
GOSUB 21300
A$ = ""
GOTO 20390
20320 IF NOT EIGHT.BIT THEN _
A$ = "Please SWITCH to N,8,1 for binary transfer" : _
GOSUB 12975 : _
SUBROUTINE.PARAMETER = 3 : _
CALL DELAYIT
20325 XMODEM.TYPE$ = " ": _
NEGATIVE.ACKNOWLEDGE$ = CHR$(21): _
SOL = 132
IF FT$ = "C" THEN _
NEGATIVE.ACKNOWLEDGE$ = FT$: _
SOL = 133: _
XMODEM.TYPE$ = "/CRC "
20330 A$ = "XMODEM" + _
XMODEM.TYPE$ + _
A1$ + _
" ready. <Ctrl X> aborts"
GOSUB 12979
RETURN
'
' *****************************************************************************
' * ASCII DOWNLOAD DRIVER *
' *****************************************************************************
'
20340 IF DF THEN _
A$ = "Switch to XMODEM or MNP" : _
GOSUB 12979 : _
GOTO 20015
CALL OPENWORK
TLA = 139
GOSUB 20750
A$ = "* <Ctrl X> aborts <Ctrl S> suspends *"
GOSUB 12977
A$ = "ASCII SEND ready. Press [ENTER] to start"
GOSUB 12995
20380 STOP.INTERRUPTS = TRUE
GOSUB 6030
IF RET THEN _
A$ = "<*>Download aborted<*>" : _
DOWNLOAD.COMPLETED = FALSE : _
GOTO 20390
20381 A$ = CHR$(26)
GOSUB 12977
IF NOT LOCAL.USER AND INP(MODEM.STATUS.REGISTER) > 127 THEN _
FOR X = 1 TO 5 : _
PRINT #3,CHR$(7) : _
SUBROUTINE.PARAMETER = 3 : _
CALL DELAYIT : _
NEXT
20385 A$ = "<End of file>"
DOWNLOAD.COMPLETED = TRUE
20390 GOSUB 12977
GOTO 50600
'
' *****************************************************************************
' * U - COMMAND FROM FILES MENU (UPLOAD) *
' *****************************************************************************
'
20400 GOSUB 41010
Q! = TCA!
IF Q > 1 THEN _
B$(1) = B$(2) : _
GOTO 20430
20420 A$ = "Enter full filename to upload"
GOSUB 12995
IF Q = 0 THEN _
RETURN
'
' *****************************************************************************
' * SEARCH FOR DUPLICATE FILENAME *
' *****************************************************************************
'
20430 Z$ = B$(1)
VIOLATION$ = "Upload "
FOR SUBDIR.INDEX = 1 TO SUBDIR.COUNT
CALL BADFILE
ON BAD.FILE.NAME.INDEX GOTO 20440,20451,20515
20440 CALL OPENWORK
20450 IF EC = 53 THEN _
GOTO 20455
IF EC = 61 THEN _
GOTO 13480
IF EC = 0 THEN _
OK = TRUE : _
GOTO 20452
20451 A$ = "Invalid file name"
GOSUB 12979
GOTO 20420
20452 IF USER.SECURITY.LEVEL >= OVERWRITE.SECURITY.LEVEL THEN _
A$ = "Overwrite file" : _
GOSUB 12995 : _
IF YES THEN _
Z$ = FILE.NAME$ : _
KILL FILE.NAME$ : _
GOTO 20475
20453 CLOSE 2
A$ = Z$ + " exists! Please use a new file name"
GOSUB 12977
GOTO 20420
20455 NEXT
FILE.NAME.HOLD$ = Z$
Z$ = UPLOAD.DIRECTORY$
20475 GOSUB 12977
CALL FINDFREE
IF VAL(FREE.SPACE$) < 2000 THEN _
GOTO 20015
A$ = "Upload disk has" + FREE.SPACE$
GOSUB 12977
LINE.25$ = "(U) " + FILE.NAME.HOLD$
SUBROUTINE.PARAMETER = 2
CALL LINE25
T$ = "Upload" + TRANSFER.OPTIONS$
IF NOT OK THEN _
OK = TRUE
20477 GOSUB 21620
IF FF THEN _
GOTO 20500
GOSUB 21600
20500 HH = 2
ON FF GOTO 20560,20262,20540,20540,20735
20510 IF SNOOP THEN _
PRINT "<Esc> by SYSOP aborts transfer"
RETURN
20515 GOSUB 1380
RETURN 20420
'
' *****************************************************************************
' * XMODEM UPLOAD DRIVER *
' *****************************************************************************
'
20540 A1$ = "RECEIVE"
GOSUB 20320
OK = TRUE
GOSUB 20860
IF OK THEN _
BLOCKS.IN.FILE# = (CDBL(LOC(2))*128#) : _
GOTO 20700
GOTO 20730
'
' *****************************************************************************
' * ASCII UPLOAD *
' *****************************************************************************
'
20560 A$ = "Transfer MUST end with a <Ctrl-K>"
GOSUB 12977
A$ = "ASCII RECEIVE ready"
GOSUB 12979
OK = FALSE
XOFF = FALSE
CLOSE 2
OPEN "O",2,FILE.NAME$
GOSUB 20510
20600 WHILE NOT EOF(3)
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
IF LOF(3) < 512 AND INP(MODEM.STATUS.REGISTER) >127 THEN _
PRINT #3,XOFF$; : _
XOFF = TRUE
20610 X$ = INPUT$(LOC(3),3)
IF INSTR(X$,CHR$(11)) THEN _
GOTO 20650
OK = TRUE
20620 PRINT #2,X$;
IF SNOOP THEN _
PRINT X$;
20621 GOSUB 60000
IF KEY.PRESSED$ = ESCAPE$ THEN _
GOTO 20745
IF NOT OK THEN _
GOTO 20670
20630 WEND
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
IF XOFF AND INP(MODEM.STATUS.REGISTER) > 127 THEN _
XOFF = FALSE : _
PRINT #3,XON$;
GOTO 20600
20650 X = INSTR(X$,CHR$(11))
IF X <> 1 THEN _
PRINT #2,LEFT$(X$,X-1) _
ELSE IF NOT OK THEN _
GOTO 20730
20660 A$ = "Upload complete"
GOSUB 12979
20661 CLOSE 2
20662 OPEN "A",2,FILE.NAME$
20663 BLOCKS.IN.FILE# = (CDBL(LOC(2))*128#) + 128
GOTO 20700
20670 A$ = XOFF$ + "System error! Upload aborted <Ctrl-K> continues"
20675 GOSUB 12979
SUBROUTINE.PARAMETER = 3
CALL DELAYIT
IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,XON$;
20680 WHILE NOT EOF(3)
X$ = INPUT$(LOC(3),3)
IF INSTR(X$,CHR$(11)) THEN _
GOTO 20730
20685 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
WEND
GOTO 20680
'
' *****************************************************************************
' * UPDATE UPLOAD DIRECTORY *
' *****************************************************************************
'
20700 BX = &H4
EN$ = UPLOAD.DIRECTORY$
GOSUB 12992
CLOSE 2
IF SHARE.IT THEN _
OPEN UPLOAD.DIRECTORY$ FOR APPEND SHARED AS #2 _
ELSE OPEN "A",2,UPLOAD.DIRECTORY$
BX = &H4
EN$ = UPLOAD.DIRECTORY$
GOSUB 12993
20710 A$ = "Describe " + _
FILE.NAME.HOLD$ + _
" (/ if for SYSOP only)" + _
RETURN.LINE.FEED$ + _
" |----+---1+0---+---2+0---+---3+0---+---4+0"
GOSUB 12975
GOSUB 12995
IF LEN(B$(1)) > 40 THEN _
GOTO 20710
20720 IF LEFT$(B$(1),1) = "/" THEN _
GOTO 20725
PRINT #2,USING "\ \######## & &"; _
FILE.NAME.HOLD$; _
BLOCKS.IN.FILE#; _
LEFT$(DATE$ ,6) + _
RIGHT$(DATE$ ,2); _
B$(1)
20725 CLOSE 2
Y$ = " >> uploaded << "
UPLOADS = UPLOADS + 1
GOSUB 41010
SECONDS.PER.SESSION! = SECONDS.PER.SESSION! + _
UPLOAD.TIME.FACTOR! * _
(TCA!-Q!)
GOTO 50610
20730 A$ = "Upload aborted"
GOSUB 12979
20735 CLOSE 2
20736 KILL FILE.NAME$
RETURN
'
' *****************************************************************************
' * SYSOP ABORTED UPLOAD *
' *****************************************************************************
'
20745 A$ = XOFF$ + "SYSOP aborted upload. Stop tranfer. <Ctrl-K> continues"
GOTO 20675
'
' *****************************************************************************
' * CALCULATE DOWNLOAD TIME ESTIMATE *
' *****************************************************************************
'
20750 IX# = FIX(LOF(2) / 128)
BLOCKS.IN.FILE# = LOF(2) / 128
IF IX# <> BLOCKS.IN.FILE# THEN _
BLOCKS.IN.FILE# = BLOCKS.IN.FILE# + 1
20780 A$ = STR$(INT(BLOCKS.IN.FILE#)) + " blocks in file"
GOSUB 12979
BLOCKS.IN.FILE# = BLOCKS.IN.FILE# * _
TLA / _
VAL(MID$("00030045120240480960",-3*BPS,3))
IF LOF(2) < 1 THEN _
GOTO 20015
20790 SUBROUTINE.PARAMETER = 2
CALL LINE25
A$ = "Transfer time:" + _
STR$(INT(BLOCKS.IN.FILE# / 60)) + " minutes," + _
STR$(INT(BLOCKS.IN.FILE#-(INT(BLOCKS.IN.FILE#/60)*60))) + _
" seconds"
GOSUB 12979
GOSUB 41000
IF (INT(BLOCKS.IN.FILE# / 60) + 1) > INT(TIME.REMAINING!) THEN _
A$ = "Not enough time left!" : _
Z$ = FILE.NAME$ + " " + A$ : _
GOSUB 12979 : _
SUBROUTINE.PARAMETER = 2 : _
CALL UPDTCALR : _
GOTO 20015
RETURN
20810 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
Y$ = ""
CALL FINDTIME(DELAY!)
DELAY! = DELAY! + 2
20840 IF NOT EOF(3) THEN _
Y$ = INPUT$(LOC(3),3) : _
RETURN
20850 CALL CHECKTIM (DELAY!)
ON SUBROUTINE.PARAMETER GOTO 20840,20851
20851 Y$ = ""
RETURN
'
' *****************************************************************************
' * XMODEM UPLOAD *
' *****************************************************************************
'
20860 GOSUB 20992
IF NOT EIGHT.BIT THEN _
GOSUB 21280
20900 X$ = ""
SEC = 1
CLOSE 2
OPEN "R",2,FILE.NAME$,128
FIELD 2,128 AS Z$
IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,NEGATIVE.ACKNOWLEDGE$;
CALL FINDTIME (TRANSFER.ABORT!)
TRANSFER.ABORT! = TRANSFER.ABORT! + WAIT.BEFORE.DISCONNECT
20920 FOR X = 1 TO 5
GOSUB 60000
IF KEY.PRESSED$ = ESCAPE$ THEN _
GOTO 21270
GOSUB 20810
20930 IF LEFT$(Y$,1) = START.OF.HEADER$ THEN _
GOTO 21020
20940 IF LEFT$(Y$,1) = END.TRANSMISSION$ THEN _
GOTO 21220
20950 IF LEFT$(Y$,1) = CANCEL$ THEN _
GOTO 21230
20960 IF Y$ <> "" THEN _
GOSUB 21280 : _
CALL CHECKTIM (TRANSFER.ABORT!) : _
ON SUBROUTINE.PARAMETER GOTO 20920,21230
20970 NEXT
IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,NEGATIVE.ACKNOWLEDGE$;
IF SNOOP THEN _
PRINT "Upload Timeout"
CALL CHECKTIM (TRANSFER.ABORT!)
ON SUBROUTINE.PARAMETER GOTO 20990,21230
20990 GOTO 20920
'
' *****************************************************************************
' * CHANGE TO 8 BIT FOR XMODEM *
' *****************************************************************************
'
20992 GOSUB 20510
IF NOT EIGHT.BIT THEN _
SUBROUTINE.PARAMETER = 3 : _
CALL DELAYIT : _
OUT LINE.CONTROL.REGISTER,3
20996 SO = 0
RETURN
'
' *****************************************************************************
' * XMODEM UPLOAD *
' *****************************************************************************
'
21000 GOSUB 20810
IF Y$ = "" THEN _
PRINT "Upload Timeout" : _
GOTO 21040
21020 X$ = X$ + Y$
IF LEN(X$) < SOL THEN _
GOTO 21000
21040 IF LEN(X$) = SOL THEN _
GOTO 21090
21050 IF LEN(X$) > SOL THEN _
GOTO 21180
21060 IF X$ = END.TRANSMISSION$ THEN _
GOTO 21220
21070 IF X$ = CANCEL$ THEN _
GOTO 21230
21080 GOTO 21170
21090 IF SEC <> ASC(MID$(X$,2,1)) THEN _
GOTO 21200
21100 IF (SEC XOR 255) <> ASC(MID$(X$,3,1)) THEN _
GOTO 21210
21110 IF FT$ = "X" THEN _
WK$ = MID$(X$,4,128): _
GOSUB 46000 _
ELSE WK$ = MID$(X$,4): _
GOSUB 46000
21112 IF FT$ = "X" THEN _
IF XMODEM.CHECKSUM <> ASC(MID$(X$,132,1)) THEN _
GOTO 21190 _
ELSE 21120
21113 IF CRC.VALUE <> 0 THEN _
GOTO 21191
21120 SO = SO + 1
IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,ACKNOWLEDGE$;
21131 LSET Z$ = MID$(X$,4)
PUT 2
21145 SEC = 255 AND (SEC + 1)
IF SNOOP THEN _
LOCATE ,1 : _
PRINT "Verified Rec Blk #";SO;
21150 X$=""
XMODEM.CHECKSUM = 0
CALL FINDTIME(TRANSFER.ABORT!)
TRANSFER.ABORT! = TRANSFER.ABORT! + 30
GOTO 20920
21170 A$ = "Short Blk in #"
GOTO 21212
21180 A$ = "Long Blk in #"
GOTO 21212
21190 A$ = "Checksum Error in #"
GOTO 21212
21191 A$="CRC Error": _
GOTO 21212
21200 A$ = "Blk # Error in #"
IF SEC-1 <> ASC(MID$(X$,2,1)) THEN _
GOTO 21212
IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,ACKNOWLEDGE$;
GOTO 21150
21210 A$ = "Complement Error in #"
21212 IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,NEGATIVE.ACKNOWLEDGE$;
IF SNOOP THEN _
PRINT LINE.FEED$;A$;SO + 1
GOTO 21150
21220 IF SNOOP THEN _
PRINT LINE.FEED$;"File Closed"
21225 IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,ACKNOWLEDGE$;
GOTO 21250
21230 IF SNOOP THEN _
PRINT LINE.FEED$;"Transfer Aborted"
21240 OK = FALSE
IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,CANCEL$;CANCEL$;
21250 IF NOT EIGHT.BIT THEN _
EIGHT.BIT = TRUE
RETURN
21270 GOSUB 20510
GOSUB 21280
GOTO 21230
'
' *****************************************************************************
' * CLEAR GARBAGE OUT OF COMMUNICATIONS BUFFER *
' *****************************************************************************
'
21280 WHILE NOT EOF(3)
CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
21281 DF$ = INPUT$(LOC(3),3)
WEND
RETURN
'
' *****************************************************************************
' * XMODEM DOWNLOAD *
' *****************************************************************************
'
21300 GOSUB 20992
SEC = 0
GOSUB 21280
FIELD 2,128 AS X$
NEGATIVE.ACKNOWLEDGE$=CHR$(21)
CALL FINDTIME (TRANSFER.ABORT!)
TRANSFER.ABORT! = TRANSFER.ABORT! + WAIT.BEFORE.DISCONNECT
21350 WHILE NOT EOF(3)
21360 Y$ = INPUT$(1,3)
IF Y$ = CANCEL$ THEN _
GOTO 21560
21380 IF Y$ = NEGATIVE.ACKNOWLEDGE$ THEN _
FF = 3: _
FT$ = "X": _
GOTO 21480 _
ELSE IF Y$ = "C" THEN _
FF = 4: _
FT$ = "C": _
GOTO 21480
21390 WEND
GOSUB 21460
CALL CHECKTIM (TRANSFER.ABORT!)
ON SUBROUTINE.PARAMETER GOTO 21350,21455
21410 CALL FINDTIME (TI!)
TRANSFER.ABORT! = TI! + WAIT.BEFORE.DISCONNECT
21415 WHILE NOT EOF(3)
21420 Y$ = INPUT$(1,3)
IF Y$ = ACKNOWLEDGE$ THEN _
GOTO 21470
21440 IF Y$ <> NEGATIVE.ACKNOWLEDGE$ THEN _
GOTO 21450
21443 IF SNOOP THEN _
PRINT LINE.FEED$;"Error -> retrans #";SO
21445 SO = SO-1
GOTO 21490
21450 IF Y$ = CANCEL$ THEN _
GOTO 21560
CALL CHECKTIM (TRANSFER.ABORT!)
ON SUBROUTINE.PARAMETER GOTO 21451,21455
21451 WEND
GOSUB 21460
CALL CHECKTIM (TRANSFER.ABORT!)
ON SUBROUTINE.PARAMETER GOTO 21410,21455
21455 IF SNOOP THEN _
PRINT "Download timeout"
GOTO 21560
21460 CALL CARRIER
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595
GOSUB 60000
IF KEY.PRESSED$ = ESCAPE$ THEN _
RETURN 21540
RETURN
21470 IF SNOOP THEN _
LOCATE ,1 : PRINT "Verified Sent Block #";SO;
21480 IF LOC(2) < LOF(2) / 128 THEN _
GET 2,(LOC(2) + 1) : _
SEC = 255 AND (SEC + 1) : _
GOTO 21490
21482 IF SNOOP THEN _
PRINT LINE.FEED$;"End of file"
21485 GOTO 21530
21490 SO = SO + 1
IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,START.OF.HEADER$; CHR$(SEC); CHR$(SEC XOR 255);X$;
21503 IF FT$ = "X" THEN _
WK$=X$ _
ELSE WK$ = X$ + CHR$(0) + CHR$(0)
21504 GOSUB 46000
21510 IF FT$ = "X" AND INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT#3,CHR$(XMODEM.CHECKSUM); _
ELSE IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT#3,CHR$(CRC.HIGH);CHR$(CRC.LOW);
GOSUB 21280
GOTO 21410
'
' *****************************************************************************
' * END-OF-FILE FOR XMODEM DOWNLOADS -- SEND THE "EOT" CHARACTER AND WAIT UP *
' * TO 2 SECONDS FOR A POSITIVE RESPONSE (I.E. AN "ACK"). IF NONE IS *
' * RE-TRY UP TO 10 TIMES. IF NO POSITIVE RESPONSE IS RECEIVED AFTER TEN *
' * ATTEMPTS, ASSUME THE DOWNLOAD WAS UNSUCCESSFULL. *
' *****************************************************************************
'
21530 IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,END.TRANSMISSION$;
FOR X = 1 TO 10
GOSUB 20810
IF INSTR(Y$,ACKNOWLEDGE$) THEN _
GOTO 21550
GOSUB 60000
IF KEY.PRESSED$ = ESCAPE$ THEN _
GOTO 21540
21535 NEXT
DOWNLOAD.COMPLETED = FALSE
GOTO 21230
21540 GOSUB 20510
21545 Y$ = CANCEL$
IF INP(MODEM.STATUS.REGISTER) > 127 THEN _
PRINT #3,CANCEL$;CANCEL$;
DOWNLOAD.COMPLETED = FALSE
GOTO 21250
21550 DOWNLOAD.COMPLETED = TRUE
GOTO 21250
21560 DOWNLOAD.COMPLETED = FALSE
IF SNOOP THEN _
PRINT LINE.FEED$;"Receiver aborted transfer"
GOTO 21545
'
' *****************************************************************************
' * MANUAL SELECT OF TRANSFER PROTOCAL *
' *****************************************************************************
'
21600 CR = 0
A$ = T$
GOSUB 12995
IF Q = 0 THEN _
GOTO 21600
Z$ = B$(1)
'
' *****************************************************************************
' * DEFAULT SELECT OF TRANSFER PROTOCAL *
' *****************************************************************************
'
21610 CALL ALLCAPS (Z$)
FF = INSTR("AMXCN",Z$)
IF FF < 1 OR (FF = 2 AND NOT MNP.SUPPORT) THEN _
GOTO 21600
FT$ = MID$("AMXC ",FF,1)
RETURN
21620 FF = -1
IF Q > 2 THEN _
Z$ = B$(3) : _
GOTO 21610
IF USER.TRANSFER.DEFAULT$ > " " THEN _
Z$ = USER.TRANSFER.DEFAULT$ : _
GOTO 21610
FF = 0
RETURN
'
' *****************************************************************************
' * GET MESSAGE HEADER RECORD DATA *
' *****************************************************************************
'
23000 GET 1,1
HIGH.MESSAGE.NUMBER = VAL(LEFT$(MESSAGE.RECORD$,8))
CALLS.TODATE! = VAL(MID$(MESSAGE.RECORD$,11,10))
CURRENT.USER.COUNT = VAL(MID$(MESSAGE.RECORD$,57,5))
HIGHEST.USER.RECORD = VAL(MID$(MESSAGE.RECORD$,62,5))
FIRST.MESSAGE.RECORD = VAL(MID$(MESSAGE.RECORD$,68,7))
NEXT.MESSAGE.RECORD = VAL(MID$(MESSAGE.RECORD$,75,7))
HIGHEST.MESSAGE.RECORD = VAL(MID$(MESSAGE.RECORD$,82,7))
NODES.IN.SYSTEM = VAL(MID$(MESSAGE.RECORD$,127))
IF NOT SYSOP AND NOT LOCAL.USER THEN RETURN
IF LAST.MESSAGE.READ < VAL(MID$(MESSAGE.RECORD$,123,4)) THEN _
LAST.MESSAGE.READ = VAL(MID$(MESSAGE.RECORD$,123,4))
LAST.MESSAGE.READ = - LAST.MESSAGE.READ * _
(LAST.MESSAGE.READ <= HIGH.MESSAGE.NUMBER)
RETURN
'
'
' *****************************************************************************
' * UPDATE MESSAGE HEADER RECORD DATA *
' *****************************************************************************
'
24000 MID$(MESSAGE.RECORD$,1,8) = STR$(HIGH.MESSAGE.NUMBER)
MID$(MESSAGE.RECORD$,11,10) = STR$(CALLS.TODATE!)
MID$(MESSAGE.RECORD$,57,5) = STR$(CURRENT.USER.COUNT)
MID$(MESSAGE.RECORD$,62,5) = STR$(HIGHEST.USER.RECORD)
MID$(MESSAGE.RECORD$,68,7) = STR$(FIRST.MESSAGE.RECORD)
MID$(MESSAGE.RECORD$,75,7) = STR$(NEXT.MESSAGE.RECORD)
MID$(MESSAGE.RECORD$,82,7) = STR$(HIGHEST.MESSAGE.RECORD)
PUT 1,1
RETURN
'
' *****************************************************************************
' * OPEN AND DEFINE MESSAGE FILE *
' *****************************************************************************
'
30500 CLOSE 1
IF SHARE.IT THEN _
OPEN ACTIVE.MESSAGE.FILE$ FOR RANDOM SHARED AS #1 _
ELSE OPEN "R",1,ACTIVE.MESSAGE.FILE$
FIELD 1,128 AS MESSAGE.RECORD$
RETURN
'
' *****************************************************************************
' * F1 - COMMAND FROM LOCAL KEYBOARD (IMMEDIATE EXIT TO DOS) *
' *****************************************************************************
'
31000 IF MULTI.LINK.PRESENT THEN _
GOSUB 60500
SYSTEM
'
' *****************************************************************************
' * F2 - COMMAND FROM LOCAL KEYBOARD (SYSOP EXIT TO DOS AND RETURN) *
' *****************************************************************************
'
32000 IF NOT LOCAL.USER THEN _
A$="Sysop has exited to DOS. Please stand by for a few seconds." : _
FUNCTION.KEY = 0 : _
GOSUB 12976 : _
SUBROUTINE.PARAMETER = 3 : _
CALL DELAYIT
SHELL DISK.FOR.DOS$+"COMMAND"
CLS
IF NOT LOCAL.USER THEN _
CALL CARRIER : _
IF SUBROUTINE.PARAMETER = -1 THEN _
GOTO 10595 ELSE : _
SUBROUTINE.PARAMETER = 2 : _
CALL LINE25 : _
A$ = "Sysop has returned from DOS. Thanks for waiting." : _
GOSUB 12977
RETURN
'
' *****************************************************************************
' * F3 - COMMAND FROM LOCAL KEYBOARD (PRINTER TOGGLE) *
' *****************************************************************************
'
33000 PRINTER = NOT PRINTER
CHANGE.VALUE = PRINTER
FIELD.POSITION = 38
GOTO 33950
'
' *****************************************************************************
' * F4 - COMMAND FROM LOCAL KEYBOARD (SYSOP ANNOY) *
' *****************************************************************************
'
33040 SYSOP.ANNOY = NOT SYSOP.ANNOY
CHANGE.VALUE = SYSOP.ANNOY
FIELD.POSITION = 34
GOTO 33950
'
' *****************************************************************************
' * F5 - COMMAND FROM LOCAL KEYBOARD (FORCE CALLER ONLINE) *
' *****************************************************************************
'
33060 FUNCTION.KEY = 0
SUBROUTINE.PARAMETER = 4
RETURN 200
'
' *****************************************************************************
' * F6 - COMMAND FROM LOCAL KEYBOARD (SYSOP AVAILABLE TOGGLE) *
' * 6 - COMMAND FROM SYSOP MENU (SYSOP AVAILABLE TOGGLE) *
' *****************************************************************************
'
33070 SYSOP.AVAILABLE = NOT SYSOP.AVAILABLE
CHANGE.VALUE = SYSOP.AVAILABLE
FIELD.POSITION = 32
GOTO 33950
'
' *****************************************************************************
' * F7 - COMMAND FROM LOCAL KEYBOARD (SYSOP GETS SYSTEM NEXT) *
' *****************************************************************************
'
33090 IF ERR=61 AND NOT DISKFULL.GO.OFFLINE THEN RETURN
SYSOP.NEXT = NOT SYSOP.NEXT
CHANGE.VALUE = SYSOP.NEXT
FIELD.POSITION = 36
GOTO 33950
'
' *****************************************************************************
' * F8 - COMMAND FROM LOCAL KEYBOARD (ASSIGN USER TEMPORARY SYSOP SECURITY) *
' *****************************************************************************
'
33110 SYSOP = NOT SYSOP
CURSOR.LINE = CSRLIN
CURSOR.ROW = POS(0)
LOCATE 25,1
PRINT SPACE$(79);
LOCATE 25,1
USER.SECURITY.LEVEL = (1 + SYSOP) * _
USER.SECURITY.SAVE - _
SYSOP * _
SYSOP.SECURITY.LEVEL
PRINT "Temp SYSOP Privileges "; MID$("OFFON",1-3*SYSOP,3);
SUBROUTINE.PARAMETER = 3
CALL DELAYIT
LOCATE CURSOR.LINE,CURSOR.ROW
SUBROUTINE.PARAMETER = 1
CALL LINE25
RETURN
'
' *****************************************************************************
' * F9 - COMMAND FROM LOCAL KEYBOARD (SNOOP TOGGLE) *
' *****************************************************************************
'
33130 IF NOT SNOOP THEN _
SNOOP = TRUE : _
LOCATE 23,1,0 : _
PRINT "SNOOP ON" : _
SUBROUTINE.PARAMETER = 2 : _
CALL LINE25 _
ELSE LOCATE ,,0 : _
SNOOP = FALSE : _
CLS
33140 CHANGE.VALUE = SNOOP
FIELD.POSITION = 58
GOTO 33950
'
' *****************************************************************************
' * F10 - COMMAND FROM LOCAL KEYBOARD (FORCE CHAT WITH USER) *
' *****************************************************************************
'
33150 IF ACTIVE.MENU$ = "M" OR _
ACTIVE.MENU$ = "U" OR _
ACTIVE.MENU$ = "F" THEN _
GOTO 33160
CURSOR.LINE = CSRLIN
CURSOR.ROW = POS(0)
LOCATE 25,1
PRINT SPACE$(79);
LOCATE 25,1
PRINT "Cannot CHAT until user reaches MAIN menu";
SUBROUTINE.PARAMETER = 1
CALL DELAYIT
LOCATE CURSOR.LINE,CURSOR.ROW
SUBROUTINE.PARAMETER = 1
CALL LINE25
RETURN
33160 Z$ = "Sysop initiated chat"
SUBROUTINE.PARAMETER = 1
CALL UPDTCALR
A$ = "Hi " + _
FIRST.NAME$ + _
", this is " + _
SYSOP.FIRST.NAME$ + _
" " + _
SYSOP.LAST.NAME$ + _
" in CHAT mode. Sorry to break in but.."
FUNCTION.KEY = 0
GOSUB 12976
GOTO 4770
'
' *****************************************************************************
' * PGUP DISPLAY USER PROFILE *
' *****************************************************************************
'
33200 DEF SEG = 0
IF (PEEK(&H410) AND &H30) <> &H30 THEN _
DEF SEG : _
SCREEN ,,0,1 : _
ELSE GOSUB 33900
DEF SEG
RETURN
'
' *****************************************************************************
' * PGDN RETURN TO NORMAL DISPLAY *
' *****************************************************************************
'
33300 DEF SEG = 0
IF (PEEK(&H410) AND &H30) <> &H30 THEN _
DEF SEG : _
SCREEN ,,0,0
DEF SEG
RETURN
'
' *****************************************************************************
' * DISPLAY USER PROFILE *
' *****************************************************************************
'
33900 USER.DATA = TRUE
DEF SEG = 0
IF (PEEK(&H410) AND &H30) <> &H30 THEN _
DEF SEG : _
LOCATE 2,1 ELSE _
DEF SEG : _
PRINT
PRINT "USER NAME:";MID$(USER.NAME$,1)
IF (PEEK(&H410) AND &H30) <> &H30 THEN _
DEF SEG : _
LOCATE 4,1
DEF SEG
PRINT "SECURITY :";STR$(USER.SECURITY.LEVEL)
PRINT "PASSWORD :";MID$(PASSWORD$,1)
PRINT "READ MSG.:";STR$(LAST.MESSAGE.READ)
PRINT "TIMES ON :";STR$(TIMES.LOGGED.ON)
PRINT "LAST ON :";MID$(LAST.DATE.TIME.ON$,1)
PRINT "DOWNLOADS:";STR$(DOWNLOADS)
PRINT "UPLOADS :";STR$(UPLOADS)
PRINT "User's Profile"
GOSUB 5410
IF USER.DATA = TRUE THEN _
USER.DATA = FALSE
RETURN
'
' *****************************************************************************
' * UPDATE NODE RECORD WITH LOCAL FUNCTION KEY ACTIVITY *
' *****************************************************************************
'
33950 IF SNOOP THEN _
SUBROUTINE.PARAMETER = 1 : _
CALL LINE25
33960 IF CONFERENCE.MODE = FALSE THEN _
GOSUB 12986 : _
GOSUB 30500 : _
GET 1,NODE.RECORD.INDEX : _
MID$(MESSAGE.RECORD$,FIELD.POSITION,2) = STR$(CHANGE.VALUE) : _
GOTO 43080
33970 PRINT "Cannot change status during Conference!"
RETURN
'
' *****************************************************************************
' * CALCULATE TIME REMAINING FOR USER *
' *****************************************************************************
'
41000 GOSUB 41010
IF BYPASS.TIME.CHECK THEN _
RETURN
IF TIME.REMAINING! < 0 THEN _
TIME.REMAINING! = 0 : _
RETURN 10553
RETURN
41010 TOA! = FRE("A")
CALL FINDTIME (TI!)
IF TI! > USER.LOGON.TIME! THEN _
CALL FINDTIME (TCA!) : _
TCA! = TCA! - USER.LOGON.TIME! _
ELSE CALL FINDTIME (TI!) : _
TCA! = TI! + 86400!-USER.LOGON.TIME!
41020 TIME.REMAINING! = (SECONDS.PER.SESSION!-TCA!) / 60
TIME.REMAINING$ = STR$(INT(TIME.REMAINING!))
RETURN
'
' *****************************************************************************
' * DISPLAY TIME REMAINING FOR USER *
' *****************************************************************************
'
41050 GOSUB 41000
A$ = TIME.REMAINING$ + " minutes left"
GOSUB 12975
RETURN
'
' *****************************************************************************
' * SHOW USER CURRENT ACCESS LEVEL *
' *****************************************************************************
'
41070 A$ = "Granted access level" + _
STR$(USER.SECURITY.LEVEL) + _
MID$(" (SYSOP)",1,-8*(USER.SECURITY.LEVEL >= SYSOP.SECURITY.LEVEL))
GOSUB 12975
RETURN
'
' *****************************************************************************
' * NULLS SET FOR NEW USERS *
' *****************************************************************************
'
42700 A$ = "Want nulls (Y/N)"
GOSUB 12995
IF NO OR YES THEN _
NULLS = NO _
ELSE 42700
'
' *****************************************************************************
' * N - COMMAND FROM UTILITY MENU (NULLS TOGGLE) *
' *****************************************************************************
'
42710 NULLS = NOT NULLS
GOSUB 9520
42720 A$ = "Nulls " + MID$("OffOn",1-3*NULLS,3)
IF USER.DATA THEN _
PRINT A$ : _
RETURN
GOSUB 12979
RETURN
'
' *****************************************************************************
' * F - COMMAND FROM UTILITY MENU (FILE TRANSFER DEFALUT MODE) *
' * FILE TRANSFER DEFAULT SET FOR NEW USERS *
' *****************************************************************************
'
42800 T$ = "FILE transfer default" + TRANSFER.OPTIONS$
GOSUB 21600
USER.TRANSFER.DEFAULT$ = FT$
42810 A$ = "PROTOCOL: " + MID$("Ascii MNP XmodemCRC None",6*FF-5,6)
IF USER.DATA THEN _
PRINT A$ : _
RETURN
GOSUB 12979
RETURN
'
' *****************************************************************************
' * C - COMMAND FROM UTILITY MENU (CHANGE CASE TOGGLE) *
' * UPPER/LOWER CASE SET FOR NEW USERS *
' *****************************************************************************
'
42950 A$ = "CAN YOUR TERMINAL DISPLAY LOWER CASE (Y/N)"
GOSUB 12995
IF NO OR YES THEN _
UPPER.CASE = YES _
ELSE 42950
42960 UPPER.CASE = NOT UPPER.CASE
A$ = "UPPER CASE " + MID$("and lowerONLY",1-9*UPPER.CASE,9)
IF USER.DATA THEN _
PRINT A$ : _
RETURN
GOSUB 12979
RETURN
'
' *****************************************************************************
' * G - COMMAND FROM UTILITY MENU (GRAPHICS WANTED) *
' * GRAPHIC MENUS SELECTION SET FOR NEW USERS *
' *****************************************************************************
'
43000 IF NOT EIGHT.BIT THEN _
A$ = "Graphics unavailable" : _
GOSUB 12979 : _
RETURN
43005 A$ = "GRAPHICS wanted: <N>one,<A>scii,<C>olor,<H>elp"
GOSUB 12995
IF Q = 0 THEN _
GOTO 43005
CALL ALLCAPS (B$(1))
GR = INSTR("NAC",B$(1))
IF GR = 0 THEN _
USER.RECORD.SAVE$ = USER.RECORD$ : _
FILE.NAME$ = HELP$(9) : _
GOSUB 1790 : _
GOSUB 9400 : _
LSET USER.RECORD$ = USER.RECORD.SAVE$ : _
GOTO 43005
USER.GRAPHIC.DEFAULT$ = MID$(" GC",GR,-(GR > 1))
GR = GR-1
43020 A$ = "GRAPHICS: " + MID$("None AsciiColor",GR*5 + 1,5)
IF USER.DATA THEN _
PRINT A$ : _
RETURN
GOSUB 12979
RETURN
43025 GOSUB 43030
GOTO 45000
43030 IF GR THEN _
N$ = FILE.NAME$ : _
GOSUB 20282 : _
IF LEN(X$) < 8 THEN _
DF$ = DR$ + _
":" + _
X$ + _
USER.GRAPHIC.DEFAULT$ + _
"." + _
EXTENTION$ : _
FILE.NAME$ = DF$ : _
CALL FINDIT : _
IF OK THEN _
FILE.NAME$ = DF$ _
ELSE FILE.NAME$ = N$
RETURN
'
' *****************************************************************************
' * UPDATE CALLERS FILE AT LOGOFF *
' *****************************************************************************
'
43050 FIELD 4,55 AS CALLERS.RECORD$,3 AS HOURS$,3 AS MINUTES$,3 AS SECONDS$
LSET CALLERS.RECORD$ = MID$(NG$,65,55)
LSET HOURS$ = STR$(HHH)
LSET MINUTES$ = STR$(MMM)
LSET SECONDS$ = STR$(SSS)
CALLERS.FILE.INDEX = CALLERS.FILE.INDEX + 1
PUT 4,CALLERS.FILE.INDEX
FIELD 4,64 AS CALLERS.RECORD$
LSET CALLERS.RECORD$ = LEFT$(NG$,64)
CALLERS.FILE.INDEX = CALLERS.FILE.INDEX + 1
PUT 4,CALLERS.FILE.INDEX
43060 LSET CALLERS.RECORD$ = STRING$(64,CHR$(0))
PUT 4
PUT 4
IF FIRST.NAME$ = SYSOP.FIRST.NAME$ AND _
LAST.NAME$ = SYSOP.LAST.NAME$ THEN _
SYSOP = TRUE _
ELSE SYSOP = FALSE
'
' *****************************************************************************
' * SAVE USER PROFILE WHEN EXITING *
' *****************************************************************************
'
43070 GOSUB 12986
GOSUB 30500
GET 1,NODE.RECORD.INDEX
MID$(MESSAGE.RECORD$,40,2) = STR$(EXIT.TO.DOORS)
MID$(MESSAGE.RECORD$,42,2) = STR$(EIGHT.BIT)
MID$(MESSAGE.RECORD$,44,2) = STR$(BPS)
MID$(MESSAGE.RECORD$,46,2) = STR$(UPPER.CASE)
MID$(MESSAGE.RECORD$,48,5) = SPACE$(5)
KG = TRUE
GOSUB 41010
MID$(MESSAGE.RECORD$,48,5) = STR$(TIME.REMAINING!)
MID$(MESSAGE.RECORD$,53,2) = STR$(GR)
MID$(MESSAGE.RECORD$,55,2) = STR$(SYSOP)
43080 PUT 1,NODE.RECORD.INDEX
GOSUB 12985
GOSUB 30500
RETURN
'
' *****************************************************************************
' * DISPLAY NON-BREAKABLE TEXT FILES *
' *****************************************************************************
'
45000 STOP.INTERRUPTS = FALSE
GOSUB 6000
STOP.INTERRUPTS = TRUE
RETURN
'
' *****************************************************************************
' * MAKE INPUT STRING HIDDEN (USE *'S TO ECHO INPUT) *
' *****************************************************************************
'
45010 HIDDEN = TRUE
GOSUB 12995
HIDDEN = FALSE
GOSUB 12979
RETURN
'
' *****************************************************************************
' * XMODEM / CRC INTERFACE *
' *****************************************************************************
'
46000 XMODEM.CHECKSUM = 0
CRC.VALUE = 0
CALL XMODEM(WK$,XMODEM.CHECKSUM,CRC.VALUE,CRC.HIGH,CRC.LOW)
RETURN
'
' *****************************************************************************
' * DISPLAY MESSAGE & COMMENT EDIT PROMPT LINE *
' *****************************************************************************
'
50400 A$ = "A)bort, C)ontinue, D)elete, E)dit, I)nsert, L)ist, M)argin, S)ave"
GOSUB 12975
RETURN
'
' *****************************************************************************
' * UPDATE DOWNLOAD STATISTICS *
' *****************************************************************************
'
50600 IF DOWNLOAD.COMPLETED THEN _
DOWNLOADS = DOWNLOADS + 1 : _
Y$ = " Downloaded " _
ELSE Y$ = " Aborted "
50610 IF LOCAL.USER THEN _
RETURN
SUBROUTINE.PARAMETER = 2
CALL AMORPM
Z$ = FILE.NAME$ + Y$ + "at " + TIM$ + " using " + FT$
SUBROUTINE.PARAMETER = 2
CALL UPDTCALR
IF LEFT$(B$(1),1) = "/" THEN _
Z$ = + " file desc: " + B$(1) : _
SUBROUTINE.PARAMETER = 2 : _
CALL UPDTCALR
RETURN
'
' *****************************************************************************
' * DIRECTORY SEARCH *
' *****************************************************************************
'
52900 CK = 2
IF Q > 1 THEN _
GOTO 52920
52910 A$ = "Search for string (Press [ENTER] to quit)"
GOSUB 12995
IF Q = 0 THEN _
RETURN
B$(2) = B$(1)
52920 CALL ALLCAPS (B$(2))
RS$ = B$(2)
A1$ = B$(2)
Z$ = B$(2)
CALL BADFILE
ON BAD.FILE.NAME.INDEX GOTO 53007, 52910, 53007
GOTO 53007
'
' *****************************************************************************
' * N - COMMAND FROM FILES MENU (DISPLAY NEW FILES SINCE LAST DIR DISPLAY) *
' *****************************************************************************
'
53000 CK = 1
IF Q > 1 THEN _
GOTO 53005
53002 A1$ = RIGHT$(LM$,4) + LEFT$(LM$,2)
A$ = "Include files on/after (MMDDYY, [ENTER] = last date on " + A1$ + ")"
GOSUB 12995
IF Q = 0 THEN _
RS$ = LM$ : _
GOTO 53007
B$(2) = B$(1)
53005 IF LEN(B$(2)) <> 6 THEN _
GOTO 53002
A1$ = B$(2)
RS$ = RIGHT$(A1$,2) + LEFT$(A1$,4)
53007 IF Q > 2 THEN _
DIR.INDEX = 3 : _
GOTO 53030
53010 A$ = "Directory(s) to scan or ALL"
GOSUB 12995
IF Q = 0 THEN _
RETURN
DIR.INDEX = 1
53030 LAST.DIR.POS = Q
LIST.DIRECTORY = TRUE
LIST.NEW = TRUE
53035 CALL ALLCAPS (B$(DIR.INDEX))
Z$ = B$(DIR.INDEX)
IF Z$ = "ALL" THEN _
GOTO 53070
53060 X = DIR.INDEX
QX = X
GOSUB 20161
DIR.INDEX = DIR.INDEX + 1
IF DIR.INDEX <= LAST.DIR.POS THEN _
GOTO 53035
LIST.NEW = FALSE
RETURN
53070 G = DIR.INDEX
J = DIR.INDEX
FOR SUBDIR.INDEX = 1 TO SUBDIR.COUNT
B$(DIR.INDEX) = SUBDIR$(SUBDIR.INDEX) + _
"*." + _
DIRECTORY.EXTENTION$
GOSUB 10720
CLS
NEXT
SUBROUTINE.PARAMETER = 1
CALL LINE25
QX = G
X = DIR.INDEX+1
GOSUB 20161
LIST.NEW = FALSE
RETURN
'
' *****************************************************************************
' * OPEN AND DEFINE CALLERS FILE *
' *****************************************************************************
'
56000 CLOSE 4
OPEN "R",4,CALLERS.FILE$,64
FIELD 4,64 AS CALLERS.RECORD$
RETURN
'
' *****************************************************************************
' * DISPLAY CALLERS FILE *
' *****************************************************************************
'
57000 CALL SKIPLINE
CALLERS.FILE.INDEX.TEMP = CALLERS.FILE.INDEX
57005 IF CALLERS.FILE.INDEX.TEMP < 1 OR _
RET THEN _
RETURN
57010 GET 4,CALLERS.FILE.INDEX.TEMP
A$ = CALLERS.RECORD$
IF LEFT$(A$,3) = SPACE$(3) OR _
INSTR(A$,"on at") = 0 THEN _
GOTO 57030
57025 CALLERS.FILE.INDEX.TEMP = CALLERS.FILE.INDEX.TEMP -1
GET 4,CALLERS.FILE.INDEX.TEMP
A1$ = LEFT$(CALLERS.RECORD$,15)
IF SYSOP OR _
LEFT$(A1$,3) <> SPACE$(3) THEN _
A$ = A$ + A1$
57027 GOSUB 57100
GOTO 57045
57030 IF SYSOP THEN _
GOSUB 57100
57045 CALLERS.FILE.INDEX.TEMP = CALLERS.FILE.INDEX.TEMP -1
GOTO 57005
57100 GOSUB 12979
57110 IF PAGE.LENGTH AND _
Q >= 0 THEN _
Q = Q + 1 : _
IF Q > PAGE.LENGTH THEN _
GOSUB 5600 : _
IF NO THEN _
RETURN 57120 _
ELSE Q = 0
57120 RETURN
'
' *****************************************************************************
' * TEST FOR FUNCTION KEY PRESSED *
' *****************************************************************************
'
60000 CALL FINDFUNC
60010 IF LEN(KEY.PRESSED$) <> 2 THEN _
RETURN
ON FUNCTION.KEY GOSUB 31000, _ ' F1
32000, _ ' F2
33000, _ ' F3
33040, _ ' F4
33060, _ ' F5
33070, _ ' F6
33090, _ ' F7
33110, _ ' F8
33130, _ ' F9
33150, _ ' F10
1398, _ ' END KEY
33200, _ ' PGUP
33300 ' PGDN
RETURN
'
' *****************************************************************************
' * MULTI-LINK DEQUEUE COM PORT *
' *****************************************************************************
'
60500 AX = &H100
60505 BX = -4
IF COM.PORT$ = "COM2" THEN _
BX = -3
'
' *****************************************************************************
' * MULTI-LINK INTERFACE *
' *****************************************************************************
'
60510 CALL RBBSML(AX,BX)
RETURN
'
' *****************************************************************************
' * REPLY TO MESSAGE SAVE ORIGINAL ATTRIBUTES *
' *****************************************************************************
'
62520 SQ = Q
LG$(10) = B$
LINES.IN.MESSAGE.SAVE = LINES.IN.MESSAGE
SL = S
NON.STOP.SAVE = NON.STOP
MESSAGE.DIM.INDEX.SAVE = MESSAGE.DIM.INDEX
RETURN
'
' *****************************************************************************
' * REPLY TO MESSAGE RESTORE ORIGINAL ATTRIBUTES *
' *****************************************************************************
'
62530 Q = SQ
B$ = LG$(10)
LINES.IN.MESSAGE = LINES.IN.MESSAGE.SAVE
S = SL
NON.STOP = NON.STOP.SAVE
MESSAGE.DIM.INDEX = MESSAGE.DIM.INDEX.SAVE
KILL.MESSAGE = FALSE
RETURN